hello jim,

thank you for your reply.

Do you know a solution without having to use a loop?

Marion

2011/9/16 jim holtman <jholt...@gmail.com>

> for (i in names(kinderrechte)){
>    q1 <- kinderrechte[, i]
>    i 1 <- get(i)
> }
>
> On Fri, Sep 16, 2011 at 4:47 AM, Marion Wenty <marion.we...@gmail.com>
> wrote:
> > Hello,
> >
> > does anyone know the solution to this problem:
> >
> > I imported a dataframe from Spss into R and saved it as an object called
> > "kinderrechte".
> >
> > I have got the following command lines:
> >
> > q1 <- kinderrechte[,"q0007_0001"]
> > l1 <- q0007_0001_l
> >
> > now i would like to be able to change the column name in the first
> command
> > line (e.g. into q0007_0002) and to get R to automatically change
> > q0007_0001_l in the second command line into q0007_0002_l without using a
> > loop.
> >
> > Thank you in advance for your help!
> >
> > Marion
> >
> >        [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
>
>
>
> --
> Jim Holtman
> Data Munger Guru
>
> What is the problem that you are trying to solve?
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to