I have some issue when I create a package.
I've created .Rproj where are thé whole files for the package.
I've made the description file.
I filled the folder R with my function.
After that I want to fill thé vignette.Rmd file.
I've put in the first chunk a library (package name)
When I run the .Rmd thé message error is: no package found with this name.
Are you an idea of this issue?
Tanks in advance
You need to build (see
devtools::build())and install your package before you can call it with
So, on website https://thinkr.fr/creer-package-r-quelques-minutes/ on step 3 it didn't say that it was necessary to use devtools::build().
I check it and I come back to tell you if it's OK
I tested and it's OK.
It's first time that I made the package and I've an other question.
My function has a lot of parameter : csv file, interger var 1, interger var 2, shp file, char var.
1 - for the csv file I download the csv file outside of the function (it's OK)
2 - interger var 1 & 2 I have to define the value outside of the function
3 - How I can you call the shp file inside my function
thanks in advance
Since this is unrelated to your previous question, could you please open this in a new thread? It helps us to keep things tidy (per the guidelines).
As for your question itself, it's really hard to say without seeing code. Could you please turn this into a self-contained reprex (short for reproducible example)?
What to do if you run into clipboard problems
If you run into problems with access to your clipboard, you can specify an outfile for the reprex, and then copy and paste the contents into the forum.
reprex::reprex(input = "fruits_stringdist.R", outfile = "fruits_stringdist.md")
For pointers specific to the community site, check out the reprex FAQ.
Those instructions end with a section telling you to use the buttons in RStudio's Build pane to build a source package for distribution. That's another way of accomplishing the same thing as what
devtools::build() does. For more info about the tools in the RStudio Build pane, see: