Posts

Showing posts from February 12, 2019

problems with converting class to factor in dataframe [closed]

Image
1 I am trying to combine dataframes and unify the classes of columns between them. I have a problem with note being about to convert one column to a factor. I've tried converting the dataframe using as.dataframe and converting the column using as.factor. I have dataframes a,b,c and list b$cat2 <-list[match (b$` Description`, list$Var1),"cat2",] b2 <-b[,c("Number", "DOB", "Gender", "cat2"),] colnames (b2) <- c ("Number", "DOB","Gender", "group" ) b2 <- as.data.frame (b2) a$group <- as.factor (a$group) class (b2$group ) [1] "tbl_df" "tbl" "data.frame" b2$group <- as.factor (b2$group) Error: Can't use matrix or array for column indexing Ca

Varys

Image
Varys Outro(s) nome(s) O Aranha O Eunuco Varys de Lys Sexo masculino Ocupação Mestre dos Sussuros Status vivo Criado por George R. R. Martin Temporada(s) 1 – 7 Primeira aparição A Game of Thrones (livro) "Lord Snow" (tv) – 1ª temporada (2011) Interpretado por Conleth Hill