? Tue, 17 Dec 2024 06:44:50 -0700 Neotropical bat risk assessments <neotropical.bats at gmail.com> ?????:> fname <- "Buzz.txt"> All<- fnameI think the code needs a call to read.table() or another function to read your data here. 'All' is still a string containing the name of the file, not its contents.> All %>% > mutate(*#convert Date from chr to Date*This call expects 'All' to contain a data.frame-like object, not a file name. HTML-based bold text doesn't work on this mailing list, so to make it easier for other people to copy & paste executable code from your messages, I would recommend composing in plain text: https://stat.ethz.ch/pipermail/r-help/2024-December/480371.html -- Best regards, Ivan
I think we need to see some sample data. As it stands, as Ivan says "All" in just a character string. A handy way to supply data is to use the dput() function. Do dput(mydata) where "mydata" is the name of your dataset. For really large datasets probably dput(head(mydata, 100)) will do. Just paste the output here. On Tue, 17 Dec 2024 at 09:57, Ivan Krylov via R-help <r-help at r-project.org> wrote:> ? Tue, 17 Dec 2024 06:44:50 -0700 > Neotropical bat risk assessments <neotropical.bats at gmail.com> ?????: > > > fname <- "Buzz.txt" > > > All<- fname > > I think the code needs a call to read.table() or another function to > read your data here. 'All' is still a string containing the name of the > file, not its contents. > > > All %>% > > mutate(*#convert Date from chr to Date* > > This call expects 'All' to contain a data.frame-like object, not a file > name. > > HTML-based bold text doesn't work on this mailing list, so to make it > easier for other people to copy & paste executable code from your > messages, I would recommend composing in plain text: > https://stat.ethz.ch/pipermail/r-help/2024-December/480371.html > > -- > Best regards, > Ivan > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > https://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- John Kane Kingston ON Canada [[alternative HTML version deleted]]
Am I being "thick" here .. mutate(data, *# text Is interpretated as mutate (data, * The star is the character... (Data is the line above being piped) Why have the comments been *'d?. Is that the source error or a posting error here? On Tue, 17 Dec 2024, 14:57 Ivan Krylov via R-help, <r-help at r-project.org> wrote:> ? Tue, 17 Dec 2024 06:44:50 -0700 > Neotropical bat risk assessments <neotropical.bats at gmail.com> ?????: > > > fname <- "Buzz.txt" > > > All<- fname > > I think the code needs a call to read.table() or another function to > read your data here. 'All' is still a string containing the name of the > file, not its contents. > > > All %>% > > mutate(*#convert Date from chr to Date* > > This call expects 'All' to contain a data.frame-like object, not a file > name. > > HTML-based bold text doesn't work on this mailing list, so to make it > easier for other people to copy & paste executable code from your > messages, I would recommend composing in plain text: > https://stat.ethz.ch/pipermail/r-help/2024-December/480371.html > > -- > Best regards, > Ivan > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > https://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]