Thank you very much for this tutorial. Very usefull
@davidfreedman15522 жыл бұрын
Thanks. Very helpful
@farnooshsheikhi10 ай бұрын
Hi this is really helpful, I was able to follow everything but when documenting the functions I got an error on "sew" in package knir . the man file wasn't created. I have 3 functions in one script
@StatistikinDD10 ай бұрын
Can you post the full error message? At what exact moment does it appear?
@nickportugal952 жыл бұрын
it's a good tutorial guys!
@LisaMok-w8k Жыл бұрын
Thanks this is great! Would you know what the problem is with Error in .get_package_metadata(pkgdir) : Files 'DESCRIPTION' and 'DESCRIPTION.in' are missing
@StatistikinDD Жыл бұрын
Do you have a DESCRIPTION text file at the top level of the package? Did you create the package using RStudio - New Project - Package?
@LisaMok-w8k Жыл бұрын
@@StatistikinDD Thanks for your prompt reply! yes i do have a DESCRIPTION text file at the top level and I am creating the package using RStudio - New Project - Package.
@StatistikinDD Жыл бұрын
@@LisaMok-w8k Looks like a known issue. github.com/rstudio/rstudio/issues/12945 github.com/r-lib/devtools/issues/2512 Maybe try updating as much as possible, e. g. RStudio, devtools, pkgbuild
@LisaMok-w8k Жыл бұрын
@@StatistikinDD Thank you!
@lahaale58402 жыл бұрын
it's nice but why do not you build upon the last project and create a project for each tutorial?
@StatistikinDD2 жыл бұрын
Thanks for your feedback! No deep reason, I just had self-contained videos in mind.
@fmri43012 жыл бұрын
Do you know how to best convert an existing project into a project? Is there some usethis chain that helps?
@StatistikinDD2 жыл бұрын
You mean from project to package? I'd create a new package in a new folder and import the R scripts. I'd feel safer to keep the original project protected "as-is". When you're happy with the package, you still have enough time to delete the old project, if needed. Some steps will have to be manual, like filling in the documentation. Note that you can create a package from a markdown document. I haven't tried that out yet, but I know it was recommended at thinkr, a place of very able R programmers. rtask.thinkr.fr/fusen-create-a-package-from-a-single-rmarkdown-file/
@huiqiao525111 ай бұрын
Thank you so much for loading the videos, they have been super helpful! I tried Build -> More -> Load All and got this error message. The folder did have the processx and processx.rdb files, so I'm not sure what the error means. Could you please advise? Error in gzfile(file, "rb") : cannot open the connection In addition: Warning message: In gzfile(file, "rb") : cannot open compressed file '\\mypackages/processx/R/processx.rdx', probable reason 'No such file or directory' Error: unable to load R code in package ‘processx’meaasge
@StatistikinDD11 ай бұрын
Hi, I'm on holidays, just a quick idea: maybe an invalid file path? I think I got similar problems when my file path contained spaces.
@shaimasoltane84452 жыл бұрын
❤❤❤❤❤❤👌👌👌👌👌👌 thank you
@shaimasoltane84452 жыл бұрын
How can i published my package for all users R. Thanks again.
@StatistikinDD2 жыл бұрын
The easier way is on github. Installation via remotes::install_github("yourgithubusername/package"). There are similar services such as gitlab or bitbucket. Harder way is on CRAN. Takes patience and time. r-pkgs.org/release.html cran.r-project.org/doc/manuals/r-release/R-exts.html
@olofjosefsson44243 жыл бұрын
Hi! How do you write the same type of documentation but for the whole package instead?
@StatistikinDD3 жыл бұрын
Good question! I plan to do a video on that as well. My preferred way would be vignettes. There can be one or several. The dplyr and data.table packages are good examples, see help(package = "dplyr") or help(package = "data.table") and click on the link "User guides, package vignettes and other documentation". Vignettes are R Markdown documents, but with a special Yaml header. To get startet, you can use the usethis package (which is loaded alongside devtools): usethis::use_vignette("Name of vignette"). This sets up the basic infrastructure and a skeleton of the vignette, which you can fill in. (It works only inside an RStudio project of type R Package.) Note that vignettes are not installed by default when you use "Install and Restart" from the Build tab. You can install from github, if you host your package there, and set the build_vignettes parameter to TRUE. Or use Build - More - Build Source Package, then use Packages - Install - from Package Archive - and browse to the source package (file type .tar.gz).
@StatistikinDD2 жыл бұрын
The video about how to include a vignette in your R package is here: kzbin.info/www/bejne/aX-TnJ-GgrOsgrs