Here is my situation. I have an object that I created with read.spss.
> a <- read.spss(...)
> attach(a)
Now in this object athere are asked questions that I would like to pull out, following the sequence of question numbers:
> q3 <- data.frame(q3_1, q3_2, q3_4, ... q3_27)
Is there a way to automate it so that it pulls out all the questions, starting from q3_the original object to the new q3 data.frame?
I tried using the function to pasteno avail.
> q3 <- data.frame(paste("q3_",1:27,sep=""))
This simply returns a data.framewith the inserted sequence.
Ideally, I would like something that draws in everything from a question starting with qX_, since some values are missing or outdated.
1beb
source
share