search for: myvariablewidth

Displaying 3 results from an estimated 3 matches for "myvariablewidth".

Did you mean: myvariablewidths
2007 Apr 26
4
select if + other questions
...Y_Q10A has the following 1=yes 2=no 9=skip all the others have no skipped or missing values Here is my code: myfile<-("c:/test2.txt") myVariableNames<-c("PUMFID","PROV","GRADE","Y_Q10A") myVariableWidths<-c(5,2,2,1) mydata<-read.fwf( file=myfile, width=myVariableWidths, col.names=myVariableNames, row.names="PUMFID", fill=TRUE, strip.white=TRUE) print(mydata) print( mydata [which(PROV=="AB" & GRADE==7 & Y_Q10A<9), ] ) Any help would be greatly appreciat...
2007 Apr 27
5
weight
Hi, I have the file below called happyguys. It is a subset of data. How do I apply the weight variable (WTPP) to this file? Can i just multiply each column (except the first column because it is a record id) by WTPP? If the answer is yes, how do I multiply one variable name by another? Thanks, Nat PROV REGION GRADE Y_Q10A WTPP 83 48 4 7 2 342233324020 115
2007 Apr 27
0
like SPSS
...-("c:/test2.txt") mysubset<-myfile mysubset$Y_Q02 <-mysubset$DVSELF <-NULL mysubset2<-mysubset mysubset2$Y_Q10B <-mysubset2$GP2_07 <-NULL myVariableNames<-c("PUMFID","PROV","REGION","GRADE","Y_Q10A","WTPP") myVariableWidths<-c(5,2,1,2,1,12.4) mysubset2<-read.fwf( file=myfile, width=myVariableWidths, col.names=myVariableNames, row.names="PUMFID", fill=TRUE, strip.white=TRUE) print(mysubset2) happyguys<-subset(mysubset2, PROV==48 & GRADE == 7 & Y_Q10A < 9) print(happyguys)...