Displaying 7 results from an estimated 7 matches for "y_q10a".
2008 Oct 21
3
code works in R desktop but not iin RWeb - How do I modify to get it working in RWeb, please?
...not work with RWeb. Could you please tell me how
to modify the code below so it will work with RWeb?
#Read in txt file
happyguys<-read.table("c:/test8.txt", header=TRUE, row.names=1)
#Subset the txt file to only include certain values
test<-subset(happyguys, GRADE == 7 & Y_Q10A < 9)
#print the subset file
print(test)
mydata<-test
#Sort the data by province, and then by Y_Q10A
mydataSorted<-mydata[ order(mydata$PROV,mydata$Y_Q10A), ]
print(mydataSorted)
#Weight the data and aggregate the value by province. There are 2 values
for each province (1 & 2) an...
2008 Oct 23
1
code works in R desktop but not iin RWeb - I got it working
...f my
variable names to work on RWeb.
Thanks for your help though!!
Natalie
__________________
I think you have to be either honest or careful, since the code you
submitted to Rweb is different with your former code! Why the
condition was changed from "test<-subset(X, GRADE == 7 & Y_Q10A < 9)"
to "test<-subset(X, PROV==48 & GRADE == 7 & Y_Q10A < 9)"?
By the way, please read the post guide -- I have no way to reproduce
your result.
Regards,
Yihui
--
Yihui Xie <xieyihui@gmail.com>
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-1...
2007 Apr 26
4
select if + other questions
...2)I cannot seem to skip variables properly when i choose certain other
variables
3)i cannot get the combination of Select If statements to work to produce
a different table with my new criteria
Here are the variables
PUMFID position1 length 5
PROV position 6 length 2
GRADE position 9 length 2
Y_Q10A position 33 length 1
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&quo...
2007 Apr 27
5
weight
...alled 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 48 4 7 1 434413433040
185 48 4 7 1 432312433040
222 48 4 7 2 133112222030
242 48 4 7 1 421313332020
247 48 4 7 2 312134212030
352 48 4...
2007 Apr 27
0
like SPSS
...Here is my code:
myfile<-("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...
2007 Apr 30
0
thousand separator (was RE: weight)
...e. Does
> anyone know how to
> fix this, please?
>
> Thanks,
>
> Nat
>
> data.frame': 290 obs. of 5 variables:
> $ PROV : num 48 48 48 48 48 48 48 48 48 48 ...
> $ REGION: num 4 4 4 4 4 4 4 4 4 4 ...
> $ GRADE : num 7 7 7 7 7 7 7 7 7 7 ...
> $ Y_Q10A: num 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 ...
> $ WTPP : Factor w/ 1884 levels
> "1,106.8250","1,336.5138",..: 1544 67
> 1568 40 221 1702 1702 1434 310 310 ...
>
>
> __________________
>
>
>
> --- Douglas Bates <bates@stat.wisc.edu&g...
2007 May 03
0
unscrible pls
...; > > > > > > > $ PROV : num 48 48 48 48 48 48 48 48
> > 48 48 ...
> > > > > > > > $ REGION: num 4 4 4 4 4 4 4 4 4 4 ...
> > > > > > > > $ GRADE : num 7 7 7 7 7 7 7 7 7 7 ...
> > > > > > > > $ Y_Q10A: num 1.1 1.1 1.1 1.1 1.1 1.1
> > 1.1 1.1 1.1 1.1 ...
> > > > > > > > $ WTPP : Factor w/ 1884 levels
> > > > > > > > "1,106.8250","1,336.5138",..: 1544 67
> > > > > > > > 1568 40 221 1702 1702 1434 3...