data<-import("billingerrors.xls", sheet = 1, header = TRUE, StringsAsFactors = FALSE)
and this is what I get
This is the data I'm using
How do I overcome this issue?
Please help
Hi @VirginTechnician! Welcome to RStudio Community
We need a bit more information to help you with this. When you say, "This is the data I'm using," what do you mean? What sort of data were you expecting to see?
If you can turn this into a reprex, it'll help us get to the bottom of this faster
reprex
what I meant was 'billingerrors.xls' that I imported in the R code is
sorry for the confusion
Is import() a function you wrote, or one from some package you’re using? Based on the error message, it seems to be using read_xls() under the hood — if that’s readr::read_xls() then it doesn’t take an argument called stringsAsFactors. See here: https://readxl.tidyverse.org/reference/read_excel.html
import()
read_xls()
readr::read_xls()
stringsAsFactors
(If none of my guesses were right then the best way to clear up the confusion will definitely be a reprex!)
Ah, so the error is what you're getting and the table is how the data looks in Excel? I think @jcblum is putting you on the right track
I've also never seen a StringsAsFactors argument where the S was capitalized. Everywhere I've seen it used, it is stringsAsFactors.
StringsAsFactors
S
Of course, that won't help with read_xls, but it was the other thing I noticed.
read_xls