Reputation: 47
I have a big list of characters (250*5000), and I need to read 7 at a time. So I want to read 1-7 then 2-8 , 3-9 etc so I can compare those to a vector of mine. My code so far is this
library("affy")
? ReadAffy
list<-seq5000
##list<-read.table("C:\\Users\\user\\Desktop\\mike\\seq5000.txt")
##list
a<-c(list)
Upvotes: 0
Views: 53
Reputation: 1255
A script based on a guess that may help, if not, more details are required!
simu <- paste(letters[sample(1:26, 250*5, replace = T)], collapse = "")
stri <- unlist(strsplit(simu, split=""))
for (i in 1:(length(stri)-6)){
val7 <- stri[i+0:6]
print(val7)
print(paste(val7, collapse = ""))
}
Upvotes: 1