Giter VIP home page Giter VIP logo

Comments (5)

lcolladotor avatar lcolladotor commented on July 20, 2024

First create a script using usethis::use_data_raw(). There you'll import any (large) file you want, then subset it to make it as small as possible such that your examples make sense but that your package is under the 5 mb limit. So like, you might make an rse object that just has data for 100 genes across say 10 samples. Something like that. You can check the file size using lobstr::obj_size(). If you want the size in Mb use lobstr::obj_size() / 1024^2. Once you are happy with how small the data is, then save it using usethis::use_data() inside the R script you generated with usethis::use_data_raw().

Here are two such examples:

In that last example, the final object was still quite big, but well, that's why I ended up sharing the data through ExperimentHub http://bioconductor.org/packages/release/bioc/html/ExperimentHub.html. That's the solution if you need a large example file for your code to work. That route involves going through http://bioconductor.org/packages/release/bioc/vignettes/HubPub/inst/doc/CreateAHubPackage.html and you want to avoid this as much as possible. Another solution is to use some already publicly available data from AnnotationHub/ExperimentHub or other packages like http://bioconductor.org/packages/release/data/experiment/html/scRNAseq.html https://github.com/lmweber/STexampleData, https://github.com/helenalc/TENxVisiumData.

https://usethis.r-lib.org/reference/use_data.html

@lahuuki: this also applies to DeconvoBuddies and other packages.

from qsvar.

lcolladotor avatar lcolladotor commented on July 20, 2024

See 20c39c0#r61118091 for some notes about the R script generated by use_data_raw().

from qsvar.

lcolladotor avatar lcolladotor commented on July 20, 2024

We can see at https://github.com/LieberInstitute/DeDHed/runs/4369810545?check_suite_focus=true#step:22:123 that we didn't document the actual data. To do so, we need a file like https://github.com/lcolladotor/derfinder/blob/master/R/genomeFstats-data.R that has the roxygen2 syntax for documenting the dataset we included.

See also https://r-pkgs.org/data.html#documenting-data

from qsvar.

joshstolz avatar joshstolz commented on July 20, 2024

have leo check

#' @source load("/dcl01/lieber/ajaffe/lab/degradation_experiments/Joint/all/rdas/qsvs/covCombs_withdlpfc_cc.rda, verbose=TRUE)
to see if this resolves the issue

from qsvar.

joshstolz avatar joshstolz commented on July 20, 2024

resolved line in comment above.

from qsvar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.