You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to get everything ironed out, but the newest error message that has me stumped is"
"Error in $<-.data.frame(*tmp*, name, value = list()) :
replacement has 0 rows, data has 88"
I narrowed it down to my get_first_name() function which is as follows:
`get_first_name <- function(full.name) {
return2 <- function(x) {return(x[2])}
x <- strsplit(as.character(full.name), ",")
x <- sapply(x, return2)
x <- trimws(x)
y <- sapply(strsplit(x, " "), '[',1)
return(y)
}`
It works running test code in both of the different formats between 2020 and following years. The frustrating part is that I did not get this error message in the 2020 file, but I have in each of the other years.
The text was updated successfully, but these errors were encountered:
The problem is that it works on a list of the names in both formats, just not once I get to the automated function. As I've been looking at it more, I think that there is a problem reading the files into R to begin with. When I run it by hand, it tells me: "EOF within quoted string". So I try turning off quoting, and instead I get the error message: "more columns than column names".
Has anyone else run into this problem?
I have been trying to get everything ironed out, but the newest error message that has me stumped is"
"Error in
$<-.data.frame
(*tmp*
, name, value = list()) :replacement has 0 rows, data has 88"
I narrowed it down to my get_first_name() function which is as follows:
`get_first_name <- function(full.name) {
return2 <- function(x) {return(x[2])}
x <- strsplit(as.character(full.name), ",")
x <- sapply(x, return2)
x <- trimws(x)
y <- sapply(strsplit(x, " "), '[',1)
return(y)
}`
It works running test code in both of the different formats between 2020 and following years. The frustrating part is that I did not get this error message in the 2020 file, but I have in each of the other years.
The text was updated successfully, but these errors were encountered: