Skip to content
Prev 359526 / 398502 Next

Help batch saving elements of a list into unique files

I ran:

drop_token1<-function(x) {
  return(paste(x[2:length(x)],sep="",collapse="."))
}
for(affdf in 1:length(out)) {
  names(out[[affdf]])<-lapply(strsplit(names(out[[affdf]]),"[.]"),drop_token1)
  write.csv(out[[affdf]],file=paste("affymetrix",affdf,".txt",sep=""))
}

I got the files out with headers:

10.11.1_.HuEx.1_0.st.v2..CEL

Minus the first two tokens (X0. and Classical.)

I really appreciate you helping me with this. I'd never have figured this out  in a timely manner.

Christian T. Stackhouse | Graduate Student
GBS Neuroscience Theme
Department of Neurosurgery
Department of Radiation Oncology
UAB | The University of Alabama at Birmingham
Hazelrig-Salter Radiation Oncology Center | 1700 6th Ave S | Birmingham, AL 35233
M: 919.724.6890 | ctstackh at uab.edu | cstackhouse at uabmc.edu | ctstackh at gmail.com

uab.edu
Knowledge that will change your world
Message-ID: <BLUPR0701MB197093F3F7C5514349C772B9C7810@BLUPR0701MB1970.namprd07.prod.outlook.com>
In-Reply-To: <CA+8X3fWudm0yx0XtxtcAAq9j7fY3h0xNFvZ0OnqF2BBrF5UDLg@mail.gmail.com>