Open aammd opened 7 years ago
Hey @aammd
In case it wasn't on purpose, just thought I'd let you know that the video about "reading csvy with comments" was uploaded twice to the playlist. And no video about writing csvy.
@jas-wong oh no! that was definitely my mistake!
Wait no this is the video about CSVY I called it "writing yaml" by mistake (the Y in CSVY stands for YAML, because that is the format the metadata is written in)
@aammd Got it, thanks!
This was very helpful @aammd. I have an issue! When I try to read in my csvy file to edit it manually, R gives error "The file is too large to open in the source editor". I imagine that I can edit the file in a different text editor. However, I was wondering if there is a way I can write a YAML in R and later attach it to the csv to produce my csvy?
@LinneaSandell this is an interesting problem. In your case, I would probably write the metadata in its own text file (FILENAME_metadata.yaml
or something) and then either a) leave it that way (two files) or b) stick one on top of another, with R or a shell script
@LinneaSandell something like this (readr makes this easy):
library(readr)
one <- read_lines("YAMLFILE.yaml")
two <- read_lines("DATAFILE.csv")
write_lines(c(one, two), "COMBINEDFILE.csvy")
@aammd I can't read in my data package using datapkg_read... I get the error message: "Error in readtokens(data, tokenizer, col_specs, colnames, locale, : expecting a string" and I can't seem to find any solutions. Any idea what I'm doing wrong?
hello @BIOL548O/2017_students ,
I have made a few short videos talking about how to create CSVY data. They're not mandatory, but you might find them useful if you have chosen that metadata format.
https://www.youtube.com/playlist?list=PLlsfgzA47vkgvwpNSZp7k93kKVhJygN_u