[R] R-Help

caam shawn.akhter at gmail.com
Wed Jan 18 21:49:58 CET 2012


I am trying to create a frequency distribution and I am a bit confused.

Here are the commands I have entered:

> data <- read.csv(file="40609_sortedfinal.csv",head=TRUE,sep=",")
> NumberOfActionsByStatus = data$STATUS
> NumberOfActionsByUser = data$ETS_LOGIN
> NumberOfBidOffer = data$BID_OFFER
> NumberOfActionsByUser.freq = table(NumberOfActionsByUser)
> NumberOfBidOffer.freq = table(NumberOfBidOffer)
> NumberOfActionsByStatus.freq = table(NumberOfActionsByStatus)


After doing that above, I was able to see the freq. distribution of contents
in each.

> cbind(NumberOfBidOffer.freq)
      NumberOfBidOffer.freq
Bid                  178074
Offer                179540

> cbind(NumberOfActionsByUser.freq)
             NumberOfActionsByUser.freq
A                             22
B                               2
C                            29028
D                        328054
E                        187
F                               7
G                             2
H                               4
I                              308

............................

Now, what I am having a problem with is, I want to then output a freq
distribution that shows out of the 22 actions by A.. how many of those
actions were BID and how many of those were OFFER.

I would like to do that for each user; ie.  A->F

What is the best command to do this? 

Any help would be appreciated,

Best,

SA


--
View this message in context: http://r.789695.n4.nabble.com/R-Help-tp4308052p4308052.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list