How to Include Data in Your R Package

  Рет қаралды 8,893

StatistikinDD

StatistikinDD

Күн бұрын

Пікірлер: 19
@kabilans9666
@kabilans9666 2 жыл бұрын
Simple and easy to understand. Nice explanation
@dominicacri5395
@dominicacri5395 2 ай бұрын
Very helpful. thank you!
@matthewkumar7756
@matthewkumar7756 2 жыл бұрын
Thanks, quick and easy to follow. Best,
@pipertripp
@pipertripp Жыл бұрын
Nice. This was really handy!
@saimajahan8317
@saimajahan8317 4 ай бұрын
I like that video. I have a question is it possible to add data from a package (which is not mine) to t? If possible, then how?
@StatistikinDD
@StatistikinDD 4 ай бұрын
You can add any data that you can get in the Global Environment. If it is already in a package, you may also add that package to Suggests or Imports.
@StatistikinDD
@StatistikinDD 4 ай бұрын
So how: load data into Global Environment. Then proceed as in video. I'm just not sure if I'd like the same data in different packages. But there may be situations where it makes sense. E. g. to avoid dependency on that other package, maybe because it contains a lot more than the data, or because it is difficult to access in your environment.
@johannesjoseph823
@johannesjoseph823 Ай бұрын
how do I add several data sets with different names in my package? I suppose each one needs its own .R file with the documentation, but how shoul they be named? just data.R?
@StatistikinDD
@StatistikinDD Ай бұрын
I recommend a speaking name for each dataset and a corresponding name for each .R file. Example (from my chartmusicdata package, which you can find at github: fjodor/chartmusicdata): Datasets: topsongs.Rda, topalbums.Rda, albums2000.Rda, songs2000.Rda Documentation: topsongs.R, topalbums.R, albums2000.R, songs2000.R
@johannesjoseph823
@johannesjoseph823 Ай бұрын
@@StatistikinDD Thank you very much!
@briandong5293
@briandong5293 Жыл бұрын
How do you document the dataset if you are reading in a csv file?
@StatistikinDD
@StatistikinDD Жыл бұрын
Good question. As far as I know, data documentation works for R objects. csv is a non-native format from R's perspective. Some packages contain data (as R-native objects) and additionally make the same data available in .csv or .tsv format, like palmerpenguins and gapminder. r-pkgs.org/data.html#sec-data-extdata
@georgegl3192
@georgegl3192 Жыл бұрын
Thanks alot! This has been absolutely helpful. But how do i push this now to github? Or how do i create a new package project and link it to github?
@StatistikinDD
@StatistikinDD Жыл бұрын
If it's not a local project, make it one. In RStudio, you can use the "New Project" option in the projects menu in the top right corner. If it's a local project, but without a git repository, create one. You can use usethis::use_git() to that end. If it's a local project with a git repository that is not yet on github, you can push it there using usethis::use_github(). Check the help page to see about the options, e. g. how to make it a private repository.
@georgegl3192
@georgegl3192 Жыл бұрын
@@StatistikinDD aha! thanks for the ultra-fast answer. gonna test it tonight...
@robertzimbardo8227
@robertzimbardo8227 Жыл бұрын
Why do you waste so much time on explaining what the function inhouse_calc does? No one cares it scales, no one cares it's not exactly between 0 and 100, etc. The video title says this is about including data in your R package so it would be better to focus on that and leave everything distracting aside.
@StatistikinDD
@StatistikinDD Жыл бұрын
Thanks for your comment, Robert. I'll try to stick more to the point next time.
@marwanotrok4311
@marwanotrok4311 Жыл бұрын
@@StatistikinDD Clearly explained and straight to point. Saved me a lot of time just by watching this video. Thank you!
@sametayaz4891
@sametayaz4891 Жыл бұрын
You have a very logical point but some information about other stuff comes with main topic's wind. You don't just go from point a to b. You also see where the supermarket on your way to point b. This kind of informations is crucial for some people, and showing it with a realistic and alive example is also important. You can simply skip it. Anyways. Great tutorial @StatistikinDD keep it rooling!
Why and How to Include a Vignette in Your R Package
12:30
StatistikinDD
Рет қаралды 6 М.
How to Document a Function in Your R Package
16:28
StatistikinDD
Рет қаралды 10 М.
REAL 3D brush can draw grass Life Hack #shorts #lifehacks
00:42
MrMaximus
Рет қаралды 12 МЛН
Kluster Duo #настольныеигры #boardgames #игры #games #настолки #настольные_игры
00:47
龟兔赛跑:好可爱的小乌龟#short #angel #clown
01:00
Super Beauty team
Рет қаралды 86 МЛН
Бенчик, пора купаться! 🛁 #бенчик #арти #симбочка
00:34
Симбочка Пимпочка
Рет қаралды 4 МЛН
Development of a example R package (CC266)
46:42
Riffomonas Project
Рет қаралды 4 М.
Spatial Analysis of US Census Data in R
3:01:33
John De Witt
Рет қаралды 17 М.
How to Create Your Own Package in RStudio
15:22
Dr. Bharatendra Rai
Рет қаралды 13 М.
How to set up Automated Tests for Your R Package using testthat
17:51
Using renv to track the version of your packages in R (CC229)
20:33
Riffomonas Project
Рет қаралды 8 М.
First steps towards my first real R package (CC267)
23:18
Riffomonas Project
Рет қаралды 898
How to Make a Custom R Package
40:51
R for the Rest of Us
Рет қаралды 1,9 М.
R Package Development 5: Including Data in a Package
12:47
John Muschelli
Рет қаралды 8 М.
REAL 3D brush can draw grass Life Hack #shorts #lifehacks
00:42
MrMaximus
Рет қаралды 12 МЛН