[R] Categorizing and displaying excel data in tabular format

David Winsemius dwinsemius at comcast.net
Wed Feb 5 01:49:23 CET 2014


On Feb 4, 2014, at 1:40 PM, ashrafali wrote:

> I have converted the excel file to csv and imported the data using R Studio. 
> 
> This is the file  R_format.xlsx
> <http://r.789695.n4.nabble.com/file/n4684737/R_format.xlsx>  
> 
> I have coded the following:
> 
> list(R_format$Tasks)
> list(R_format$Client.Mnemonic)
> task.freq=table(R_format$Tasks)
> task.freq
> cbind(task.freq)

I would have instead used the table function. 

> table(R_format$Tasks)
> table(R_format$Client.Mnemonic)
> with(R_format, table(Tasks,Client.Mnemonic )

You could, of course, assign them to object names.

> task.freq
> cbind(task.freq)

cbind is used to put two columns side by side. It doesn't make much sense to supply it with only one argument.

> 
> 
> I am not sure how to categorize the things. In the excel sheet I have the
> same tasks done for different client mnemonics. I want to categorize them
> accordingly and display them in tabular format one after the other. 
> 
> The works are:
> * Categorize according to Tasks
> * Syntax for plotting the table with two columns Tasks and ClientMnemonics. 
> 
Using table with two arguments may give you wnat you requested. 
> 
> thanks!!
> 
> Ashraf
> 
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/Categorizing-and-displaying-excel-data-in-tabular-format-tp4684711p4684737.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius
Alameda, CA, USA




More information about the R-help mailing list