fragilefamilieschallenge / ffmetadata

R package for accessing Fragile Families metadata
https://fragilefamilieschallenge.github.io/ffmetadata/index.html
Other
5 stars 1 forks source link

A quick note on the returnDataFrame parameter of select_metadata() #15

Closed msalganik closed 6 years ago

msalganik commented 6 years ago

I found this section a bit confusing. I think it might be better with an example. With an example I'm not sure that it would even need its own section heading.

rvinh commented 6 years ago

Example added, unnecessary description removed

msalganik commented 6 years ago

Great

msalganik commented 6 years ago

Can you also please add a print statement for select <- select_metadata(variable_name = "ce3datey", fields = c("data_source", "data_type")) select_full <- select_metadata(variable_name = "ce3datey") and select_return_list <- select_metadata(variable_name = "ce3datey", returnDataFrame = FALSE)

I think that seeing the different kinds of output will really help people understand what is going with the returnDataFrame option.

rvinh commented 6 years ago

I added formatted print statements for each way of using select_metadata, but the formatting looks a little strange for the select_full <- select_metadata(variable_name = "ce3datey") call. At the moment, I've split the row up into multiple lines but I could also have one long row extend off the page if that would be clearer/preferred.

msalganik commented 6 years ago

Interesting. That's not what I expected at all. Is there a way to make the printing more what it looks like in the console? That's what it used to look like.

msalganik commented 6 years ago

Here's an example of a vignette where the print statements look more like what one would see in the R terminal: https://cran.r-project.org/web/packages/dplyr/vignettes/dplyr.html

rvinh commented 6 years ago

I was using Pander to format the data frames into tables in the version from yesterday. I've reverted it to just the native console format.

msalganik commented 6 years ago

OK, I think that looks good. It is not very pretty, but it gives users a good sense of what to expect (and it matches the style of other vignettes). As far as I'm concerned, this issue is closed. If you agree, please close it.

rvinh commented 6 years ago

Ok great!