[Solved] R: How can I change a matrix array? [closed]
Many options here. Unfortunately you don’t show any effort to resolve the problem or even to make it clear and reproducible. For example, using ifelse : dat <- read.table(text=””aaa” 28 “aac” 8 “aag” 20″) dat$V1 <- with(dat,ifelse(V1 %in% c(‘aaa’,’aag’),’K’,’N’)) dat V1 V2 1 K 28 2 N 8 3 K 20 EDIT If I want … Read more