I have a data frame with two columns and I'm trying to assign list objects row by row to two cells (one in each column):
Type_I_Error<-c()
Type_II_Error<-c()
new_frame<-data.frame("Type_I_Error", "Type_II_Error")
new_frame <- data.frame(Type_I_Error=character(),
Type_II_Error=character(),
stringsAsFactors=FALSE)
type1errorlist <- list(character(0))
type1errorlist[[1]][length(type1errorlist[[1]]) + 1] <- "type1errors:"
type1errorlist[[1]][length(type1errorlist[[1]]) + 1] <- "2002_9"
type2errorlist <- list(character(0))
type2errorlist[[1]][length(type2errorlist[[1]]) + 1] <- "type2errors:"
type2errorlist[[1]][length(type2errorlist[[1]]) + 1] <- "2001_9"
a<-as.character(type1errorlist)
b<-as.character(type2errorlist)
new_frame <- rbind(new, c(a, b))
I get the following error: Error in rbind2(..1, r) : cannot coerce type 'closure' to vector of type 'list'
How do I fix this?