how to access varioables from dataframe in aloop?

hi,
i know that to access ceratin variables from data frame i need to use $,
like this
Frames<-filename$Frames
Now i have 30 colums and i als0 want to save them in the same named variables.

S001_Ang_278<-filename$S001_Ang_278
S002_Ang_420<-filename$S002_Ang_420
S003_Ang_422<-filename$S003_Ang_422
S004_Ang_278<-filename$S004_Ang_278
S005_Ang_420<-filename$S005_Ang_420
.... till S030Ang_420<-filename$S030_Ang_420
i dont know how to loop over them

The simplest way to do this is with

attach(name_of_your_data_frame)

The columns will be separately available, but they will not show up with ls().

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.