Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Little improvement #4

Open
paul-carteron opened this issue Apr 14, 2022 · 2 comments
Open

Little improvement #4

paul-carteron opened this issue Apr 14, 2022 · 2 comments

Comments

@paul-carteron
Copy link

Hello @feddelegrand7 ,
First of all, bravo for this beautiful and surely useful work !! I already tried it a bit and it works perfectly !

I notice that BARIS_explain() return a raw character so you have some : "\n" or "l&#x27". Special character are not read.

An easy way of enhancing it for a better reading is to use cat function here like that :

return(cat(df_explain$description))

Have a good day ;)

PS : If you're interested I'm doing quite the same work with IGN data in the happign package

@feddelegrand7
Copy link
Owner

feddelegrand7 commented Apr 16, 2022

thanks @paul-carteron I'll have a look at Baris_explain, the problem with cat is that you cannot assign the result of it to a variable, i.e, this is not possible: x <- cat("hello"). The happign package looks neat, thanks!

@paul-carteron
Copy link
Author

Yes, you're right. To have both advantages I aready done something like that :

foo <- function(text, silent = FALSE){
   if (!silent){
        cat(text)
   } 
   return(text)
}

So in both case you assign the text, and you can choose if you wanna display it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants