Re: [R] Dividing rows in groups

2016-04-23 Thread David Winsemius
> On Apr 23, 2016, at 9:46 PM, Saba Sehrish via R-help > wrote: > > Hi > > > I have two data frames as shown below (second one is obtained by aggregating > rows of similar IDs in df1.). They both have similar number of columns but > rows of df2 are lesser than rows of df1. > > > df1: >

[R] Dividing rows in groups

2016-04-23 Thread Saba Sehrish via R-help
Hi I have two data frames as shown below (second one is obtained by aggregating rows of similar IDs in df1.). They both have similar number of columns but rows of df2 are lesser than rows of df1. df1: ID A B 1 1 2 1 0 3 2

[R] multiplication by groups

2016-04-23 Thread Saba Sehrish via R-help
Hi I have two data frames as shown below (second one is obtained by aggregating rows of similar IDs in df1.). They both have similar number of columns but rows of df2 are lesser than rows of df1. df1: IDAB 1 12 1 03 2 5NA

Re: [R] Finding Highest value in groups

2016-04-23 Thread Saba Sehrish via R-help
Thanks a lot. Its really helpful Regards Saba On Saturday, 23 April 2016, 6:50, Giorgio Garziano wrote: Since the aggregate S3 method for class formula already has got na.action = na.omit, ## S3 method for class 'formula' aggregate(formula, data, FUN, ..., subset, na.action = na.o

Re: [R] Data Frame Column Name Attribute

2016-04-23 Thread William Dunlap via R-help
You could use transform() instead of [[<- to add columns to your data.frame so the new columns get transformed they way they do when given to the data.frame function itself. E.g., > dd <- data.frame(X=1:5, Y=11:15) > str(transform(dd, Z=matrix(X+Y,ncol=1,dimnames=list(NULL, "NewZ" 'data.frame

[R] assign color to subsets

2016-04-23 Thread ch.elahe via R-help
Hi I have the following df and I created two subsets but I don't know how to use these subsets as the colors of my plot. data.frame': 36919 obs. of 162 variables $TE :int 38,41,11,52,48,75,. $TR :int 100,210,548,546,. $Command :factor W/2229

Re: [R] Data Frame Column Name Attribute

2016-04-23 Thread David Winsemius
> On Apr 23, 2016, at 8:59 AM, thomas mann wrote: > > I am attempting to add a calculated column to a data frame. Basically, > adding a column called "newcol2" which are the stock closing prices from 1 > day to the next. > > The one little hang up is the name of the column. There seems to be

[R] [R-pkgs] New Package on CRAN: wbstats

2016-04-23 Thread Piburn, Jesse O.
Hello, I wanted to announce the release of a new package on CRAN wbstats. >From the description "Tools for searching and downloading data and statistics >from the World Bank Data API >(http://data.worldbank.org/developers/api-overview) and the World Bank Data >Catalog API (http://data.worldban

[R] Data Frame Column Name Attribute

2016-04-23 Thread thomas mann
I am attempting to add a calculated column to a data frame. Basically, adding a column called "newcol2" which are the stock closing prices from 1 day to the next. The one little hang up is the name of the column. There seems to be an additional data column name included in the attributes (dimnam

[R] Java memory error when reading a small xlsx file

2016-04-23 Thread jpm miao
Hi, I tried to read a (small) xlsx file by "readWorksheetFromFile" function of "XLConnect" package and "read.xlsx" function in "xlsx" package, but I got this error message: Error: OutOfMemoryError (Java): Java heap space I tried to follow the solution on the web http://stackoverflow.com/qu

Re: [R] subset by multiple letters condition

2016-04-23 Thread Adams, Jean
This is quite a different question. I suggest you start a new post with a new subject line for this. And I suggest you include code for an example plot that you want to use. Otherwise, you might look here for some ideas on how to control colors in a scatter plot using base r, http://stackoverflo

Re: [R] subset by multiple letters condition

2016-04-23 Thread ch.elahe via R-help
Thanks Jean, Does anyone know how to set these [hast1] and [hast2] as the colors of a plot? On Friday, April 22, 2016 7:39 AM, "Adams, Jean" wrote: You can use the grepl() function to give you logicals for each criterion, then combine them as needed. For example: # example version of Co

[R] CRAN package check results tabulated ... wasRe: Number of package in Ubuntu

2016-04-23 Thread David Winsemius
> On Apr 23, 2016, at 6:56 AM, David Winsemius wrote: > > >> On Apr 22, 2016, at 11:51 AM, mylistt...@gmail.com wrote: >> >> Dear Experts , >> >> I am using R with Spark on Windows and now there is a need to move to >> Ubuntu. I wanted to know if most of the packages that are available on >

[R] Plotting a large time series

2016-04-23 Thread Adrian Mcmenamin
I have a time series with many millions of points. Each point is of the form (time, value) but where the value is 0 there is no record - ie the data set is sparse. If I plot this using plot(myData) I get a correct plot going from time 0 to time 7x10e7. Given that there are many millions of point

Re: [R] Number of package in Ubuntu

2016-04-23 Thread David Winsemius
> On Apr 22, 2016, at 11:51 AM, mylistt...@gmail.com wrote: > > Dear Experts , > > I am using R with Spark on Windows and now there is a need to move to Ubuntu. > I wanted to know if most of the packages that are available on windows , > would they be available on Ubuntu/Linux? If not can I co