Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recommend adding example data files for documentation #50

Closed
kelly-sovacool opened this issue Aug 8, 2024 · 3 comments · Fixed by #64
Closed

recommend adding example data files for documentation #50

kelly-sovacool opened this issue Aug 8, 2024 · 3 comments · Fixed by #64
Assignees

Comments

@kelly-sovacool
Copy link

kelly-sovacool commented Aug 8, 2024

The quickstart explains how to load files into tidytacos:

taco <- read_tidytacos("/path/to/my_data")

but then proceeds to use the urt dataset for the rest of the tutorial, which is already a tidytacos object.

It would be helpful to have an example file in your package in inst/extdata and use it in the tutorial, so users will have a better understanding of the expected file format.

Additionally, it would be best practice to have code in data-raw to show how urt and leaf were created. https://r-pkgs.org/data.html#sec-data-data-raw

@kelly-sovacool
Copy link
Author

Moreover, the quick start guide directs users to the source code to learn about more options for importing data.

More options to import and convert your data can be found here.

I strongly discourage this. Novice users should not be expected to read the source code to learn how to use the package. This information should be distilled into a vignette for users to read.

@kelly-sovacool
Copy link
Author

kelly-sovacool commented Oct 23, 2024

I see you added raw data to data-raw. The R package convention is to place raw data files in inst/extdata/ and include R scripts in data-raw/ showing how datasets in data/ were generated. data-raw/ is not installed with the package, so users will not be able to access it unless it is in inst/extdata/.

So this means your csv files currently in data-raw/ should be moved to inst/extdata/ (see https://r-pkgs.org/data.html#sec-data-extdata), and you should create R scripts in data-raw/ which show how the binary datasets in data/ were created (see https://r-pkgs.org/data.html#sec-data-sysdata).

@kelly-sovacool
Copy link
Author

kelly-sovacool commented Oct 23, 2024

on a related note, this snippet in the README does not work for end users:

taco <- read_tidytacos("data-raw/tidytacos/leaf")

once you move the example files to their proper locations as described above, you will be able to do something like this instead:

taco <- read_tidytacos(system.file("extdata", "tidytacos", "leaf", package = "tidytacos"))

similarly, it would be nice (but not strictly required) if your dada and phyloseq examples worked:

tidytacos/README.md

Lines 37 to 44 in 5b585c2

```R
taco <- from_dada(seqtab.nochim, taxa)
```
If you have data in the form of a phyloseq object you could convert it using:
```R
taco <- from_phyloseq(phylo_obj)
```

@TheOafidian TheOafidian reopened this Oct 26, 2024
@TheOafidian TheOafidian mentioned this issue Oct 29, 2024
Merged
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants