Displaying 4 results from an estimated 4 matches for "myag".
Did you mean:
mag
2012 Dec 07
2
Assigning cases to groupings based on the values of several variables
...% 3),"mygroup.m1"]<-7
mydata[(mydata$sex %in% "f")&(mydata$age %in% 4),"mygroup.m1"]<-8
(mydata)
# Method 2 of assigning to groups - very "loopy":
mydata$mygroup.m2<-NA
for(i in 1:nrow(mydata)){ # i<-1
mysex<-mydata[i,"sex"]
myage<-mydata[i,"age"]
mydata[i,"mygroup.m2"]<-groupings[(groupings$sex %in%
mysex)&(groupings$age %in% myage),"mygroup"]
}
(mydata)
# Method 3 of assigning to groups - also "loopy", but less than Method 2:
mydata$mygroup.m3<-NA
for(i in 1:nrow(gro...
2008 Oct 21
3
code works in R desktop but not iin RWeb - How do I modify to get it working in RWeb, please?
...en 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) 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...
2005 Apr 18
1
[LLVMdev] Best way to require a pass from a dynamically loaded module?
Hi, I have a situation where I built an analysis pass as a loadable
module, but I'd like to require it from other passes, to make it
available if it's been loaded.
Is there a clean way to do this, or am I stretching it too far?
If there isn't a nice way, I'd be interested in discussion about what
would be the least ugly hack just to get it working.
Thanks!
-mike
--
Michael
2008 Oct 23
1
code works in R desktop but not iin RWeb - I got it working
...s:
>
> test<-subset(X, 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:
>
> Rwe...