Re: [R] installing tikzDevice for R 3.2.3

2016-01-15 Thread Ranjan Maitra
Yihui, Thanks very much! Explicitly specifying the RStudio server works, and I have reinstalled tikzDevice Best wishes, Ranjan On Fri, 15 Jan 2016 22:42:41 -0600 Yihui Xie wrote: > Please do not use http://r-forge.r-project.org/ to install tikzDevice. > We no longer update tikzDevice on R-F

Re: [R] installing tikzDevices for R 3.2.3

2016-01-15 Thread Yihui Xie
Please do not use http://r-forge.r-project.org/ to install tikzDevice. We no longer update tikzDevice on R-Forge. It may be a problem of your CRAN mirror. When in doubt, try the RStudio mirror (the chance that Amazon CloudFront is down should be much smaller than a single metal server somewhere):

Re: [R] installing tikzDevices for R 3.2.3

2016-01-15 Thread Ranjan Maitra
On Fri, 15 Jan 2016 21:25:06 -0600 Ranjan Maitra wrote: > Hi, > > I wanted to install tikzDevices on a installation of R (3.2.3) on a new > machine. However, I am getting: > > > install.packages('tikzDevices') > > Warning message: > package ‘tikzDevices’ is not available (for R version 3.2.3

[R] installing tikzDevices for R 3.2.3

2016-01-15 Thread Ranjan Maitra
Hi, I wanted to install tikzDevices on a installation of R (3.2.3) on a new machine. However, I am getting: > install.packages('tikzDevices') Warning message: package ‘tikzDevices’ is not available (for R version 3.2.3) Is there any way out for me other than wait for the tikzDevices to be upd

Re: [R] Use SQL in R environment

2016-01-15 Thread Wensui Liu
Check sqldf On Friday, January 15, 2016, Amoy Yang via R-help wrote: > Hi All, > I am new here and a beginner for R. Can I use SQL procedure in R > environment as it can be done in SAS starting with PROC SQL; > Thanks for helps! > > Amoy > [[alternative HTML version deleted]] > > __

[R] readWorksheetFromFile error message: invalid 'envir' argument

2016-01-15 Thread jpm miao
Hi, I try to read a large xlsx file from by the function "readWorksheetFromFile" in "XLConnect" package. Sometimes it works, but sometimes it gives an error message. When it does not work and I try to run the program line by line (in RStudio), then it would sometimes work, but sometimes it does

Re: [R] Use SQL in R environment

2016-01-15 Thread Dalthorp, Daniel
Very general question...try searching "R SQL" on google for a start. On Fri, Jan 15, 2016 at 9:59 AM, Amoy Yang via R-help wrote: > Hi All, > I am new here and a beginner for R. Can I use SQL procedure in R > environment as it can be done in SAS starting with PROC SQL; > Thanks for helps! > > A

[R] Use SQL in R environment

2016-01-15 Thread Amoy Yang via R-help
Hi All, I am new here and a beginner for R. Can I use SQL procedure in R environment as it can be done in SAS starting with PROC SQL; Thanks for helps! Amoy [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUB

Re: [R] creating cubes

2016-01-15 Thread Richard M. Heiberger
## I think you should look at the abind ## array bind ## function in the abind package. install.packages("abind") library(abind) ? abind ## the examples are comprehensive ## It allows constructions like these w <- matrix(1:6, 2, 3, dimnames=list(letters[1:2], LETTERS[3:5])) x <- w+10 y <- w+20 z

[R] rjags loading error

2016-01-15 Thread Dalthorp, Daniel
What has happened?! I get the following error message when I try to load rjags package (w/ Windows 7)... > require(rjags) Loading required package: rjags Error in get(method, envir = home) : lazy-load database 'C:/Program Files/R/R-3.2.3/library/rjags/R/rjags.rdb' is corrupt In addition: Warni

Re: [R] creating cubes

2016-01-15 Thread Dalthorp, Daniel
One possibility is to arrange it as a 3-dimensional array with two 5 x 5 matrices (i.e. a 5 x 5 x 2 array): arrD3<-array(dim=c(5,5,2)) # the first matrix is (e.g.) random normal deviates: mat1<-matrix(rnorm(25),nrow=5,ncol=5) # the second matrix is (e.g.) random uniform deviates: mat2<-matrix(ru

Re: [R] creating cubes

2016-01-15 Thread Matteo Richiardi
Hi Daniel, thanks for your answer. How can I populate the array with the matrixes? Suppose I want to populate it with 10 matrixes matrix(NA,5,5) Matteo On 15 January 2016 at 22:26, Dalthorp, Daniel wrote: > How about: D<-array(dim=c(d1, d2, d3))? > > > > On Fri, Jan 15, 2016 at 2:20 PM, Matteo

Re: [R] EXTRACT POINT DATA FROM NETCDF FILE

2016-01-15 Thread Ben Tupper
Hello Peter, It's not possible to help you resolve your difficulties with what you have shared. How we know what is mean to 'have no luck'? What you need to do is provide a reproducible example - something anyone with R might be able to replicate. Here is some terrific advice on how to make i

Re: [R] creating cubes

2016-01-15 Thread Dalthorp, Daniel
How about: D<-array(dim=c(d1, d2, d3))? On Fri, Jan 15, 2016 at 2:20 PM, Matteo Richiardi < matteo.richia...@gmail.com> wrote: > What is the best way to store data in a cube? That is, I need to create a > data structure D with three indexes, say i,j,h, so that I can access each > data point D[i

[R] creating cubes

2016-01-15 Thread Matteo Richiardi
What is the best way to store data in a cube? That is, I need to create a data structure D with three indexes, say i,j,h, so that I can access each data point D[i,j,h], and visualise sections like D[i,j,] or D[,,h]. I have tried to create an array of matrixes: D <-matrix(matrix(NA,i,j),h) but th

Re: [R] write.xlsx- writing in a single sheet

2016-01-15 Thread Jim Lemon
Hi Mohsen, I can guess two things that you might want. One is to join all of the data in the "CSV" files into a single data frame and then write that to a single XLSX sheet. If the names and data structure of these files are similar enough to "rbind" them, just do this in R and then write the resul

[R] Segmentation Fault on Debian

2016-01-15 Thread Lorenzo Isella
Dear All, I am running R on a debian testing machine and lately I have experienced several segmentation faults (often when running Amelia on some large data set). However, please have a look at the script pasted at the end of the email. If I uncomment the line about the RJSDMX library (which does

Re: [R] EXTRACT POINT DATA FROM NETCDF FILE

2016-01-15 Thread Peter Tuju
Daer R, usersI want to get a point data from netcdf file using the longitude and latitude, but have no luck with the code I'm using. Here is the code. Please help! rm( list = ls() )                   # Clearing the workspace setwd( "/run/media/tuju/0767090047/extract

Re: [R] Panel plots for means of cyclical observations

2016-01-15 Thread Richard M. Heiberger
## Kieran, ## I think the root problem is that you allowed the levels of month to be alphabetical. ## continuing with your example ##You need to take control of the levels with a statement like levels(z$month) z$month <- factor(z$month, levels=monthsOfYear) levels(z$month) ## now you can write s

[R] Ordinal regression with some categories combined for some data

2016-01-15 Thread Bob O'Hara
Hi! I've been asked about a problem where I think I can see how to write the model, but don't know if it's been implemented in R. It's not something I work on a lot, so I'm hoping someone else can point me to an answer straight away. The researcher has been carrying out germination experiments: l

Re: [R] write.xlsx- writing in a single sheet

2016-01-15 Thread Frans Marcelissen
Do you mean that you try to write several dataframes to the same sheet? You have asked this before, and I think it has been said that that is not possible with write.xls. I suppose that you still try to write rows of data of varying length to one sheet. I think that is possible with the lowlevel fu

Re: [R] write.xlsx- writing in a single sheet

2016-01-15 Thread Marc Schwartz
> On Jan 15, 2016, at 8:43 AM, Mohsen Jafarikia wrote: > > Hello all: > > I am having problem writing a few files in a single sheet of excel. It > seems R has problem writing on the same sheet. Maybe there is a command > that I am missing. Here is the code I am using: > > library(xlsx) > > if

[R] write.xlsx- writing in a single sheet

2016-01-15 Thread Mohsen Jafarikia
Hello all: I am having problem writing a few files in a single sheet of excel. It seems R has problem writing on the same sheet. Maybe there is a command that I am missing. Here is the code I am using: library(xlsx) ifn11 <- "A1.xlsx" dat11 <- read.xlsx(ifn11, sheetName="A.csv", header = TRUE)

Re: [R] Problems with data structure when using plsr() from package pls

2016-01-15 Thread S Ellison
> > I am trying to make pls-regression using plsr() from package pls, with > > Mevik & Wehrens (2007) as tutorial and the datasets from the package. > > Everything works real nice as long as I use the supplied datasets, but > > I don´t understand how to prepare my own data. > > This is what I have

[R] Panel plots for means of cyclical observations

2016-01-15 Thread Kieran
I want to create a panel plot using xyplot of a line graph whose x-axis is months of the year and y-axis is the average rainfall in a given month over the 6 years the data spans. There should be two levels in this panel plot: odd and even months. Creating this plot without splitting it into level

Re: [R] Problems with data structure when using plsr() from package pls

2016-01-15 Thread Sarah Goslee
Backing up a step: On Wednesday, January 13, 2016, CG Pettersson wrote: > R version 3.2.3, W7 64bit. > > Dear all! > > I am trying to make pls-regression using plsr() from package pls, with > Mevik & Wehrens (2007) as tutorial and the datasets from the package. > Everything works real nice as lo

Re: [R] Problems with data structure when using plsr() from package pls

2016-01-15 Thread Bjørn-Helge Mevik
Jeff Newmiller writes: > Using I() in the data.frame seems ill-advised to me. You complain about 96 > variables but from reading your explanation that seems to be what your data > are. In PSLR, it is common to regress a variable against matrices with very many coloumns, often several thousands.

Re: [R] Problems with data structure when using plsr() from package pls

2016-01-15 Thread Bjørn-Helge Mevik
CG Pettersson writes: >> frame1 <- data.frame(gushVM, I(n96)) [...] >> pls1 <- plsr(gushVM ~ n96, data = frame1) > Error in model.frame.default(formula = gushVM ~ n96, data = frame1) : > invalid type (list) for variable 'n96' As far as I can remember, you get this error if the n96 object was

Re: [R] Updating a Time Series After Forecast()

2016-01-15 Thread Berend Hasselman
> On 14 Jan 2016, at 22:36, Lorenzo Isella wrote: > > Dear All, > Perhaps I am drowning in a cup of water, since I am positive that the > answer will be a one-liner. > Consider the following short script > > > > library(forecast) > > ts

[R] R 3.2.3 on Windows 8.1 with interface scaling: how do I produce metafiles that fill the whole canvas?

2016-01-15 Thread Peter Crowther
To reproduce (requires Windows): 1) Set your desktop scaling to 100%; 2) run the script below; 3) observe that the chart in scaled-example.wmf takes up the whole canvas. 4) Set your desktop scaling to greater than 100% (try 150% or 200%); 5) again run the script below; 6) observe that the chart in