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

Cannot load csv into data frame to "readData()" #16

Open
blueskies579 opened this issue Jan 30, 2024 · 1 comment
Open

Cannot load csv into data frame to "readData()" #16

blueskies579 opened this issue Jan 30, 2024 · 1 comment
Assignees
Labels

Comments

@blueskies579
Copy link

blueskies579 commented Jan 30, 2024

I formatted my csv in the format suggested and cannot get R to load the data to even do the readData() function. I have tried different ways of selecting the csv file and variations of the recommended code from https://www.frontiersin.org/articles/10.3389/fpls.2019.01184/full#f1 but none of it has been working for me. The csv downloads as a value that says "character empty" instead of the 7-column data frame that I would expect. When I use this code: Ramf.data<-read.csv(file.choose()) I can see the data in a data frame, but then when I go to do any actions in the Ramf package (including readData) I get this error message:

Error in vroom::vroom(): ! file is not one of the supported inputs: • A filepath or character vector of filepaths • A connection or list of connections • Literal or raw input Run rlang::last_trace() to see where the error occurred.
Backtrace: ▆

└─Ramf::readData((as.data.frame("Ramf5")), type = "grid")
├─base::suppressMessages(read_csv(infile))
│ └─base::withCallingHandlers(...)
└─readr::read_csv(infile)
└─vroom::vroom(...)
Run rlang::last_trace(drop = FALSE) to see 3 hidden frames.

I want to look at the data frame using readData() and use the other functions in Ramf as well, but I can't use the actions without the mentioned error message. Here is what I have for code so far (that has not been working):

#Ramf Ramf.data<-read.csv(file.choose()) Ramf.6 <- dir(system.file("Ramf.csv", package = "Ramf"), full.names = TRUE, pattern = "grid.csv") readData((as.data.frame("Ramf.data")), type="grid") readData(Ramf.6, type="grid")

@mchiapello mchiapello self-assigned this Jan 31, 2024
@mchiapello
Copy link
Owner

Could you please share your csv (or part of it). I need to reproduce the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants