Displaying 6 results from an estimated 6 matches for "wtpp".
Did you mean:
wtmp
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 48 4...
2008 Oct 21
3
code works in R desktop but not iin RWeb - How do I modify to get it working in RWeb, please?
...ydata[ 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) and the results show the number of people for
each province who responded with value 1 or value 2
myag<-aggregate(mydataSorted$WTPP,
by=list(mydataSorted$PROV,mydataSorted$Y_Q10A), FUN=sum, na.rm=TRUE)
#print the aggregated results
print(myag)
#Results below
Group.1 Group.2 x
1 10 1 466.2879
2 11 1 104.7425
3 12 1 1200.9314
4 13 1 888.4311
5 24...
2008 Oct 23
1
code works in R desktop but not iin RWeb - I got it working
...GRADE == 7 & Y_Q10A < 9)
>
> #sort the data by province and the variable Y_Q10A
>
> mydata<-test
>
> mydataSorted<-mydata[ order(mydata$PROV,mydata$Y_Q10A), ]
>
> #Weight the data and aggregate it by province and Y_Q10A
>
> myag<-aggregate(mydataSorted$WTPP,
> by=list(mydataSorted$PROV,mydataSorted$Y_Q10A), FUN=sum, na.rm=TRUE)
>
> #print the aggregated data
>
> print(myag)
>
> _
> This does not work. RWeb does not show any results. Here is the response
I
> am getting from RWeb:
>
> Rweb:> postscript(file= "/t...
2007 Apr 27
0
like SPSS
...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 & Y_Q10A <...
2007 Apr 30
0
thousand separator (was RE: weight)
...arator" box, and write it back out. Not exactly ideal to
say the least. If anyone can provide a better solution in R, I'm all
ears...
Andy
From: Natalie O'Toole
>
> Hi,
>
> These are the variables in my file. I think the variable i'm having
> problems with is WTPP which is of the Factor type. 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...
2007 May 03
0
unscrible pls
...bject: Re: [R] thousand separator (was RE:
> > weight)
> > > > > >
> > > > > > One possibility would be to use something
> > like the following
> > > > > > post-import:
> > > > > >
> > > > > > > WTPP
> > > > > > [1] 1,106.8250 1,336.5138
> > > > > >
> > > > > > > str(WTPP)
> > > > > > Factor w/ 2 levels
> > "1,106.8250","1,336.5138": 1 2
> > > > > >
> > > > > &g...