[R] Subset problem
RMSOPS
ricardosousa2000 at clix.pt
Wed Mar 7 11:24:51 CET 2012
Good Morning
I have a small question regarding the function subset.
I am copying data from one table but I just want to collect data from a
user.
When do I take the view, presents the results I want.
The problem arises when can I make the tab. for RES_ID, introduces me to
zero results do not envision noVIEW
val_user='16'
x.sub <- data.frame(subset(Dataset,Dataset$USER==val_user))
View(x.sub)
lev_ID<-levels(x.sub$RES_ID)
res<-table(x.sub$RES_ID)
res
E000- 0
F160- 0
XFRT- 33
XVVR- 0
SWEX- 23
SWRS- 0
just wanted to see the data with values greater than 0 in the example only
two results
because when create the graph create empty space
barplot(table(x.sub$RES_ID),width =1,angle=45,inside = TRUE, plot = TRUE,
axis.lty = 0, offset = 0,add = FALSE, main="hist
C",col=rainbow(x.sub$CALLEDSTATIONID))
Thanks
--
View this message in context: http://r.789695.n4.nabble.com/Subset-problem-tp4452837p4452837.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list