Re: [R] Fast matrix multiplication

2018-08-10 Thread Doran, Harold
Yeah, you might not be able to go much faster here unless A has some specialized structure that you can take advantage of (e.g., sparsity)? On 8/10/18, 11:22 AM, "Ravi Varadhan" wrote: >Hi, > >I would like to compute: A %*% B %*% t(A) > > > >A is a mxn matrix and B is an nxn symmetric,

Re: [R] Trying to Generalize a Function in R

2018-08-10 Thread rsherry8
Duncan, Since you asked, here is an updated version of my function. # This method gets the Data. getReturns1 <- function(symbol, norm = FALSE) { library(quantmod) series = getSymbols(symbol, src = "yahoo", from = start, to = end, auto.assign = FALSE) length <- nrow( series )

Re: [R] help

2018-08-10 Thread R. Mark Sharp via R-help
Marco, The error message indicates that nlon*nlat is 420 and that 1378620/420 has a remainder. For the matrix to form, all rows have to be complete. I am guessing you have at least one value incorrect among nlon, nlat, t or the length of fulldatav. Mark R. Mark Sharp, Ph.D. Data Scientist

Re: [R] Fast matrix multiplication

2018-08-10 Thread Ista Zahn
Hi Ravi, You can achieve substantial speed up by using a faster BLAS (e.g., OpenBLAS or MKL), especially on systems with multiple CPUs. On my (6 year old, but 8 core) system your example takes 3.9 seconds with using the reference BLAS and only 0.9 seconds using OpenBLAS. Best, Ista On Fri, Aug

[R] cumulate of snow cumulates from daily values of different automatic stations for some time intervals

2018-08-10 Thread Stefano Sofia
Dear R-list users, I have 10 data frames (called df1, df2, ... df10), where each of them contains snow data from an automatic meteorological station (obviously each station has a different station code). Here is an example of df1: station_code date_factor date_POSIX snow 217 1999-12-15

[R] help

2018-08-10 Thread Marco Antonio Pérez
I am trying to write a function to make a matrix of precipitation with this secuencie; PRIMER PERIODO cordex1 <- nc_open("pr_CAM-44i_ICHEC-EC-EARTH_rcp45_r12i1p1_SMHI-RCA4_v1_mon_200601-201012.nc") fullmon1<-ncvar_get(cordex1,"pr") lat<-ncvar_get(cordex1,"lat", start=c(35.5),count=c(20))

[R] Fast matrix multiplication

2018-08-10 Thread Ravi Varadhan
Hi, I would like to compute: A %*% B %*% t(A) A is a mxn matrix and B is an nxn symmetric, positive-definite matrix, where m is large relative to n (e.g., m=50,000 and n=100). Here is a sample code. M <- 1 N <- 100 A <- matrix(rnorm(M*N), M, N) B <- crossprod(matrix(rnorm(N*N),

Re: [R] Resolving installed package updates warning

2018-08-10 Thread Rich Shepard
On Fri, 10 Aug 2018, MacQueen, Don wrote: I would start by trying to install rgdal by itself, rather than as part of a "batch" update. As in Install.packages('rgdal') Don, rgdal was supposed to be installed, but you have a valid point. My expectation is that you will see a more

Re: [R] Resolving installed package updates warning

2018-08-10 Thread MacQueen, Don via R-help
I would start by trying to install rgdal by itself, rather than as part of a "batch" update. As in Install.packages('rgdal') My expectation is that you will see a more complete error message specific to rgdal, which presumably will provide a clue or pointer. -Don -- Don MacQueen Lawrence

Re: [R] Resolving installed package updates warning

2018-08-10 Thread Rich Shepard
On Fri, 10 Aug 2018, MacQueen, Don wrote: C++11 is a programming language. Don, That's what I assumed; a version of c++, which is installed here by default. Perhaps not that verision, but ... configure: C++11 support available and then later says /usr/include/cpl_port.h:187:6: error:

Re: [R] Resolving installed package updates warning

2018-08-10 Thread Bert Gunter
What's C++11? Google it! -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Aug 10, 2018 at 9:53 AM, Rich Shepard wrote: > On Fri, 10 Aug

Re: [R] Resolving installed package updates warning

2018-08-10 Thread MacQueen, Don via R-help
Rich, C++11 is a programming language. Interestingly, someone else asked for help yesterday with exactly the same error message for rgdal. The subject line was "Help reinstalling rgdal (Ubuntu 16.04)" The suggestions were to visit the mailing lists R-sig-geo and/or R-sig-debian. It's

[R] The auto.arima function in forecast package

2018-08-10 Thread John
Hi, I am wondering if I am doing correctly, but my auto.arima usually (if not always) give me (0,1,0), whatever portion of the series I take. In the following instances, only the last one yields ARIMA(0,1,1), and all the other cases yield ARIMA(0,1,0). I would like to do forecast based on

[R] Resolving installed package updates warning

2018-08-10 Thread Rich Shepard
Updating installed packages ends with a warning: Warning message: In install.packages(update[instlib == l, "Package"], l, contriburl = contriburl, : installation of package ‘rgdal’ had non-zero exit status What steps should I take to correct this? Rich