[R] books and datasets

2014-03-05 Thread Carlos Hernandez
Dear R-users, I am looking for books and R examples that focus on the analysis of advertising, marketing, web metrics, and social media datasets. I wonder if you have recommendations for me. Thanks much! [[alternative HTML version deleted]] __ R

Re: [R] advice about R for windows speed

2009-11-19 Thread Carlos Hernandez
re http://cran.r-project.org/bin/windows/contrib/ATLAS/C2D/ == On Thu, Nov 19, 2009 at 5:06 PM, Marc Schwartz wrote: > On Nov 19, 2009, at 9:25 AM, Carlos Hernandez wrote: > > Dear All, >> I appreciate any advice or hints you could provide about the following. >

[R] advice about R for windows speed

2009-11-19 Thread Carlos Hernandez
Dear All, I appreciate any advice or hints you could provide about the following. We are running R code in a server (running Windows XP and QuadCore Xeon processors, see details below) and we would like to use the server efficiently. Our code takes a bit more than 6 seconds per 25 iterations in th

Re: [R] rbind for a list

2009-09-29 Thread Carlos Hernandez
On Tue, Sep 29, 2009 at 8:05 PM, David Winsemius wrote: > > On Sep 29, 2009, at 1:43 PM, Carlos Hernandez wrote: > > Dear All, >> I´m using the following code: >> >> all1<-gg2[[1]][[1]]; for(i in 1:48){ all1 <- rbind(all1,gg2[[i]][[1]]) } >> > > L

Re: [R] rbind for a list

2009-09-29 Thread Carlos Hernandez
Thank you for your quick reply! It works perfectly! On Tue, Sep 29, 2009 at 7:51 PM, Henrique Dallazuanna wrote: > Try this; > > do.call(rbind, sapply(gg2, '[', 1)) > > On Tue, Sep 29, 2009 at 2:43 PM, Carlos Hernandez > wrote: > > Dear All, > > I´m usi

[R] rbind for a list

2009-09-29 Thread Carlos Hernandez
Dear All, I´m using the following code: all1<-gg2[[1]][[1]]; for(i in 1:48){ all1 <- rbind(all1,gg2[[i]][[1]]) } to create a new matrix that contains all the matrices in a list called gg2. gg2 is a list that looks like >> gg2 [[1]] [[1]][[1]] [[2]] [[2]][[1]] . . . [[48]] [[48]][[1]] Is the

[R] more efficient vectorization of a function ?

2009-09-09 Thread Carlos Hernandez
dear All, i'm using the following two functions: share.vector <- function (vec1) { vec1 <- vec1 - max(vec1,na.rm=TRUE) -0.1 ## this line avoids overflow vec1 <- exp(vec1) vec2 <- vec1/(1+sum(vec1,na.rm=TRUE)) vec2 } share.matrix <- function (mat1) { out1 <- apply(mat1,2,share.vector)

Re: [R] extract and replace columns of matrices stored in a list

2009-09-03 Thread Carlos Hernandez
i did not understand this last line, so far i couldn't make it work. would it be easier to replace the values (the third column of each matrix in my.array) using an array like in #1? thank you for your reply! > On Thu, Sep 3, 2009 at 11:16 AM, Carlos Hernandez > wrote: > >>

[R] extract and replace columns of matrices stored in a list

2009-09-03 Thread Carlos Hernandez
Dear All, I created a list (of length Z) in the following way: my.array <- vector("list", Z) then i assigned a matrix (of T rows by N columns) in each of the elements of the list my.array in the following way: my.array[[i]] <- matrix.data ##( matrix.data has dimensions TxN, and i repeated this

Re: [R] number of Mondays

2009-01-15 Thread Carlos Hernandez
: Carlos Hernandez wrote: dear All, i'm trying to calculate the number of Mondays, Tuesdays, etc that each month within a date range has. I have time series data that spans 60 months and i want to calculate the number of Mondays, Tuesdays, Wed, etc of each month. (I want to control for w

[R] number of Mondays

2009-01-15 Thread Carlos Hernandez
dear All, i'm trying to calculate the number of Mondays, Tuesdays, etc that each month within a date range has. I have time series data that spans 60 months and i want to calculate the number of Mondays, Tuesdays, Wed, etc of each month. (I want to control for weekly seasonality but my dat