fertile icon indicating copy to clipboard operation
fertile copied to clipboard

Error in the installation: base::source(shims)

Open caavellanedag opened this issue 4 years ago • 3 comments

When I try to install the package I got this:

Error: package or namespace load failed for 'fertile': .onAttach failed in attachNamespace() for 'fertile', details:

Thank you

caavellanedag avatar May 18 '21 23:05 caavellanedag

Hi @caavellanedag. Can you provide a reproducible example of what you did to generate this error? Did you just run

remotes::install_github("baumer-lab/fertile")

??

beanumber avatar May 19 '21 18:05 beanumber

Hello. I was checking a program where a file is used inside the paste0() function. After that it is readed inside a read.csv command. When I ran the function called "have_only_used_files()" it is in the output, so I thought that it was because it was used inside "paste0" first. So what I did next was try to add the "paste0" function as a shim, so I did

add_shim(paste0, package = "base")

After that I got an error and the package was useless, because I could not even load it again. After that, I realize that there is a created file in my documents and after delete it, reinstalling Rstudio and R, it works again.

My question is, what should I do to make that the "have_only_used_files()" function recognize the file, which name is called inside a paste0 and after that is readen ?

Thank you so much for helping me.

caavellanedag avatar May 22 '21 10:05 caavellanedag

I'm still not sure that I fully understand what you are doing, but I don't think it should be necessary to create your own shim for paste0().

Are you doing something like?:

d <- read.csv(paste0(...))

Can you share the output from has_only_used_files()?

beanumber avatar May 27 '21 13:05 beanumber