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

[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, ...,

Re: [R-es] Error de suscripcion

2016-04-23 Thread Javier Marcuzzi
Estimado Sus correos llegan a la lista. Javier Rubén Marcuzzi De: jhon william rico bejarano Enviado: sábado, 23 de abril de 2016 15:26 Para: R-help-es@r-project.org Asunto: [R-es] Error de suscripcion En gmail me llego un mensaje que ya estoy inscrito.

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"

[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

[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

[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

[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

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,

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: #

Re: [R-es] Test de valores atípicos de Bonferroni

2016-04-23 Thread Jose Fernandez Menendez
Buenas. No soy experto en el tema, pero según lo veo lo que ocurre es lo siguiente: - outlierTest analiza los residuos studentizados, que como su nombre indica siguen una distribución t de Student. - la hipótesis nula del test es que una observación no es un outlier, con lo que el residuo

[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

[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

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

Re: [R] Unique Ordering

2016-04-23 Thread Jim Lemon
Hi Edward, I'm not really sure that this is what you want as I can't figure out what the "earn" factor is, but: epdat[order(epdat$Var2,epdat$Freq,decreasing=TRUE),] Jim On Sat, Apr 23, 2016 at 4:08 AM, Patzelt, Edward wrote: > Hi R-Help, > > data at bottom > > I've been

Re: [R] Creating variables on the fly

2016-04-23 Thread Ulrik Stervbo
Hi Georg, The " around Kunden$* looks unintentional to me. Second: haveyou considered using a long table? Then you would fill a known set of columns. Third if you must have columns based on year I believe df[[a.column.name]] will work. Best Ulrik schrieb am Sa., 23. Apr.

Re: [R] Creating variables on the fly

2016-04-23 Thread Sarah Goslee
The direct answer to your question is to look at ?get and ? assign. The R-ish answer to your question is to store the data as elements of a list rather than separate files and use lapply() instead. Sarah On Friday, April 22, 2016, wrote: > Hi all, > > I would like to use a