Re: [R] high density plots using lattice dotplot()

2015-04-23 Thread Duncan Mackay
Hi Luigi Michael answered your question about printing lattice and ggplot require their graphics to be in print() If you have problems in printing you may have to use trellis.device(device = pdf, # or what ever the actual device is file = ,

Re: [R] R lattice bwplot: Fill boxplots with specific color depending on factor level

2015-04-23 Thread Pablo Fleurquin
Thank you both. I just wanted to point out that before assigning the order of colors in vector col, one should check that it corresponds with how levels are ordered in levels(mydata$Col3). Best, Pablo 2015-04-23 5:46 GMT+02:00 Richard M. Heiberger r...@temple.edu: Pablo, I would do it

Re: [R] R Freezes (Mac) using file.choose()

2015-04-23 Thread Erik Duhaime
Hi, Did you ever get an answer about this? It has been so so frustrating for me... Thanks! On Sunday, March 22, 2015 at 11:29:28 PM UTC-4, Vindoggy ! wrote: I'm using a mac with OSX Yosemite (10.10.2), running the latest version of R (3.1.3). But I've been having this same issue since

[R] install.packages problem

2015-04-23 Thread Sales RExcel
It seems that installed.packages has changed behavior in 3.2.0. We have a local package repository containing only binaries of packages (for Windows). Since 3.2.0, using install.packages for a package form such a repository does not work any more. The solution is to add the parameter

[R-es] Usar una matriz sparse desde python a R

2015-04-23 Thread Pedro Concejero Cerezo
Hola erreros Estoy rizando el rizo con esto de las matrices sparse y he encontrado la forma de hacerlo en python, que va rapidísimo. Por tanto tengo una matriz sparse en un objeto python con esta info: 138493x26744 sparse matrix of type 'type 'numpy.int64' Quiero hacer lo mismo con R pero me

Re: [R] Error in solve.default(-val)

2015-04-23 Thread Michael Dewey
Andrés Si prefieres escribir en español https://stat.ethz.ch/mailman/listinfo/r-help-es seria mejor (That is a link to the Spanish language version of R-help) On 23/04/2015 05:24, Andrés M wrote: Buenas noches, comedidamente me dirijo a ustedes para hacerles una consulta respecto a un error

[R] Error in solve.default(-val)

2015-04-23 Thread Andrés M
Buenas noches, comedidamente me dirijo a ustedes para hacerles una consulta respecto a un error que me ha salido al ejecutar R. Soy estudiante de Ingeniería y estoy basando mi tesis en un estudio estadístico usando R Studio. Estoy trabajando una base de datos con 12 variables y 1433 datos en cada

Re: [R-es] Usar una matriz sparse desde python a R

2015-04-23 Thread javier.ruben.marcuzzi
Estimado Pedro Concejero Cerezo ¿Qué usa de R para sparse matrix? Me llama la atención que funcione lento, se me ocurre en un error al escribir su código R y no de R en si mismo, aunque puedo estar muy errado. Javier Rubén Marcuzzi Enviado desde Correo de Windows De:

Re: [R] Two Factorial Experiment with a Single Control Group

2015-04-23 Thread Darcy Trimpe
Thank you for the correction and the code. I had just discovered the repeated measure error myself yesterday :-). I had not thought of using a manova. This may work better than what I was going to do. Thanks again. - Original Message - From: c06n [via R]

Re: [R] Predict in glmnet for Cox family

2015-04-23 Thread jitvis
Will I be able to do a prediction similar to above with random forest and compare both the predict survival time result from AFT model and the Survival Random forest model ? Sincerely, -- View this message in context:

Re: [R] reshape data frame when one column has unequal number of entries

2015-04-23 Thread Duncan Mackay
Hi Dimitri here is a quick crude way (needs some polishing) data.frame(a = rep(x$a,sapply(sapply(x$b, strsplit, , ), length)), b= unlist(sapply(x$b, strsplit, , ))) Duncan Duncan Mackay Department of Agronomy and Soil Science University of New England Armidale NSW 2351 Email: home:

[R] Possible bug in rlm

2015-04-23 Thread Francis Bursa
Dear all, I believe I have found a bug in rlm in the MASS package. Specifically, the scale estimate can be wrong when there are no outliers. The following code snippet is an example: dose - c(0,1,2,0,1,2) response - c(0.659,1.633,3.621,1.803,3.093,4.424) line - c(1,1,1,2,2,2) k2 -

Re: [R] reshape data frame when one column has unequal number of entries

2015-04-23 Thread PIKAL Petr
Hi I am not sure if this is more efficient than some loop I just gave your data another column names. names(x)-c(one, two) x one two 1 1 a, b, c 2 2d, e 3 3 f s-(strsplit(x$two, ,)) s [[1]] [1] a b c [[2]] [1] d e [[3]] [1] f first-rep(x$one

[R] run Rscript and ignore errors?

2015-04-23 Thread Nick Matzke
Hi R-help, I've looked at google, the Rscript documentation and the Rscript --help output and haven't found much on this. So, here's my question: I have a rather long script that runs on various input datasets. It is quite convenient to run the script from the Terminal command line with

[R] Why is findAssocs() not working?

2015-04-23 Thread Mike
findAssocs() is not working, as is seen below. Lucid and dreaming occur together quite often in the book. The corpus is a single document, the text version of a book.  Does this function require at least two documents?  If so, if I split the book in half will I get the correlations regarding

Re: [R] R_Calculating Thiessen weights for an area with irregular boundary

2015-04-23 Thread Manoranjan Muthusamy
It certainly is! Thank you. Cheers, Mano On Thu, Apr 23, 2015 at 12:02 AM, Rolf Turner r.tur...@auckland.ac.nz wrote: On 22/04/15 22:43, Manoranjan Muthusamy wrote: SNIP 4. SNIP How can I show the Dirichlet tile names (i.e. 1,2,3,,8) in the plot? There's no built-in way at

[R] Power calculation

2015-04-23 Thread Keniajin Wambui
I am are currently evaluating risk factors associated with a virus A , incidence among patients with a follow-up sample of 312. Overall, the virus incidence rate is estimated at 4.7 per 100 pyr, 95% CI (3.0-7.4), with a total follow-up time of 383.9 person years and 18 incidence cases. How can I

Re: [R] Predictions on training set shorter than training set

2015-04-23 Thread William Dunlap
Are there missing values in your data? If so, try adding the argument na.action = na.exclude to your original call to glm or lm. It is like the default na.omit except that it records which rows were omitted (because they contained missing values) and fills in the corresponding entries in the

[R] GLM course in Palm Cove

2015-04-23 Thread Highland Statistics Ltd
Apologies for cross-posting We would like to announce the following statistics course in Palm Cove, Australia. Course1: GLM with R (Bayesian and frequentist) Location: Palm Cove, Australia Date: 11-14 August 2015 Price: 475 GBP Course website:

[R] Run Rscript and ignore errors?

2015-04-23 Thread Nick Matzke
Hi R-help, I've looked at google, the Rscript documentation and the Rscript --help output and haven't found much on this. So, here's my question: I have a rather long script that runs on various input datasets. It is quite convenient to run the script from the Terminal command line with

[R] Predictions on training set shorter than training set

2015-04-23 Thread Mark Drummond
Hi all, Given a simple logistic regression on a training data set using glm, the number of predicted values is less than the number of observations in the training set: fit.train.pred - predict(fit, type = response) nrow(train) [1] 62660 length(fit.train.pred) [1] 58152 As a relative

[R] Need content_transformer() called by tm_map() to change non-letters to spaces

2015-04-23 Thread Mike
Hello, In the following code, any characters matching  /|@| \\|) will be changed to a space. library(tm) toSpace - content_transformer(function(x, pattern) gsub(pattern, , x)) docs - tm_map(docs, toSpace, /|@| \\|) What code would transform all non-letters to a space?  (What goes where the

Re: [R] reshape data frame when one column has unequal number of entries

2015-04-23 Thread Dimitri Liakhovitski
Thank you very much, everybody! On Thu, Apr 23, 2015 at 10:38 AM, Duncan Mackay dulca...@bigpond.com wrote: Hi Dimitri here is a quick crude way (needs some polishing) data.frame(a = rep(x$a,sapply(sapply(x$b, strsplit, , ), length)), b= unlist(sapply(x$b, strsplit, , ))) Duncan Duncan

[R] cbind question, please

2015-04-23 Thread Erin Hodgess
Hello! I have a cbind type question, please: Suppose I have the following: dog - 1:3 cat - 2:4 tree - 5:7 and a character vector big.char - c(dog,cat,tree) I want to end up with a matrix that is a cbind of dog, cat, and tree. This is a toy example. There will be a bunch of variables. I

[R] Warning message when starting RStudio

2015-04-23 Thread Sun Shine
Hi list Recently, when starting up RStudio, the following warning is being displayed: Error in tools:::httpdPort = 0L : comparison (4) is possible only for atomic and list types I think that this is specific to RStudio because starting R in a terminal window doesn't produce this message.

Re: [R] Suggest method

2015-04-23 Thread Boris Steipe
Please keep the conversation on the list ... Here is a toy example to help you think this through: set.seed(11235) # artifical random data ... # miles: normalized between 0 and 1 # flights: number of flights within last year # since: how many days ago was the last flight booked # score: just

Re: [R] - Obtaining superscripts to affix to means that are not significantly different from each other with R

2015-04-23 Thread David L Carlson
The function cld() in package multcomp generates compact letter displays, but does not format them as exponents of the group names. - David L Carlson Department of Anthropology Texas AM University College Station, TX 77840-4352 -Original Message-

[R] problem setting default timezone

2015-04-23 Thread Bos, Roger
Dear All, I would like to learn the proper way to set the default time zone so I get the correct date for my files. The code below is non-reproducible (sorry) because it is based on a file on my system, but I hope someone will be able to help me anyway. I have a file that was last modified

Re: [R] - Obtaining superscripts to affix to means that are not significantly different from each other with R

2015-04-23 Thread Joachim Audenaert
Is there also a version for non parametric tests like: pairwise.wilcox.test {stats} Met vriendelijke groeten - With kind regards, Joachim Audenaert onderzoeker gewasbescherming - crop protection researcher PCS | proefcentrum voor sierteelt - ornamental plant research Schaessestraat 18,

Re: [R] Warning message when starting RStudio

2015-04-23 Thread Berend Hasselman
On 23-04-2015, at 08:45, Sun Shine phaedr...@gmail.com wrote: Hi list Recently, when starting up RStudio, the following warning is being displayed: Error in tools:::httpdPort = 0L : comparison (4) is possible only for atomic and list types I think that this is specific to RStudio

[R] - Obtaining superscripts to affix to means that are not significantly different from each other with R

2015-04-23 Thread Joachim Audenaert
Hello all, It is often time consuming to interpret p-values of multiple pairwise comparisons of groups and assign them a letter code for publication purposes. So I found this interesting link to a program that does this for you. http://www.jerrydallal.com/lhsp/similar.htm I was wondering if

[R] geom_errorbar() issue in ggplot2

2015-04-23 Thread Axel Urbiz
Hello, I'm getting a warning message from the reproducible example below. Why would geom_errorbar() remove 2 cases in this case? Both upper and lower limits of the error bar contain var1 and are within the axis limits. df - data.frame(var1 = seq(0, 1, 0.1), var2 = seq(0, 1, 0.1)) df$ll -

Re: [R] geom_errorbar() issue in ggplot2

2015-04-23 Thread Axel Urbiz
Thanks Thierry. So if a variable x = a, and the limits for x are [a, a+b], is that data point considered outside the limits? Thanks, Axel. On Thu, Apr 23, 2015 at 6:17 AM, Thierry Onkelinx thierry.onkel...@inbo.be wrote: The limits are more narrow than the data. ggplot2 treats data outside the

Re: [R] geom_errorbar() issue in ggplot2

2015-04-23 Thread Thierry Onkelinx
In this case the horizontal lines of the errorbars go output the limits. And are therefore not displayed. Use coord_cartesian(xlim = 0:1) instead of setting the limits in scale_x_continuous(). ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest

Re: [R] geom_errorbar() issue in ggplot2

2015-04-23 Thread Thierry Onkelinx
The limits are more narrow than the data. ggplot2 treats data outside the limits as NA. ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie Kwaliteitszorg / team Biometrics Quality Assurance Kliniekstraat 25 1070 Anderlecht

Re: [R] Warning message when starting RStudio

2015-04-23 Thread Albin Blaschka
Hello Am 23.04.2015 um 09:57 schrieb Berend Hasselman: On 23-04-2015, at 08:45, Sun Shine phaedr...@gmail.com wrote: Hi list Recently, when starting up RStudio, the following warning is being displayed: Error in tools:::httpdPort = 0L : comparison (4) is possible only for atomic and list

[R] create function to plot high density data using lattice

2015-04-23 Thread Luigi Marongiu
Dear all, with the most useful help of Duncan I updated a script to plot high density data in the form of 384 squares containing tiny plots. The function works and it is possible to create a pdf version of the output. but when i try to make a function out of this script, the resulting pdf file is

[R] reshape data frame when one column has unequal number of entries

2015-04-23 Thread Dimitri Liakhovitski
Hello! I have my data frame x with 2 character columns: x - data.frame(a = numeric(), b = I(list())) x[1:3,a] = 1:3 x[[1, b]] - a, b, c x[[2, b]] - d, e x[[3, b]] - f x$a = as.character(x$a) x$b = as.character(x$b) x str(x) I need to produce this data frame: 1 a 1 b 1 c 2 d 2 e 3 f Is

Re: [R] problem setting default timezone

2015-04-23 Thread Michael Dewey
In-line below On 23/04/2015 14:01, Bos, Roger wrote: Dear All, I would like to learn the proper way to set the default time zone so I get the correct date for my files. The code below is non-reproducible (sorry) because it is based on a file on my system, but I hope someone will be able to

Re: [R] How to calculate vif of each term of model in R?

2015-04-23 Thread PIKAL Petr
Well. Your function results in error. f1-function(model){ + vfs-vif(model) + vfs + ex-subset(vfs,vfs=10) + print(ex) + maxx-which.max(ex) + print(maxx) + mm-vector(mode = numeric,length = 50) + + mm-maxx + maxindex-which.max(ex) + print(maxindex) + + } F1(model1) Error: could not find function

Re: [R] create function to plot high density data using lattice

2015-04-23 Thread Michael Dewey
I suspect Luigi that if you wrap the call to xyplot in print( ) matters might be improved. On 23/04/2015 13:50, Luigi Marongiu wrote: Dear all, with the most useful help of Duncan I updated a script to plot high density data in the form of 384 squares containing tiny plots. The function

Re: [R] problem setting default timezone

2015-04-23 Thread John McKown
On Thu, Apr 23, 2015 at 8:01 AM, Bos, Roger roger@rothschild.com wrote: Dear All, I would like to learn the proper way to set the default time zone so I get the correct date for my files. The code below is non-reproducible (sorry) because it is based on a file on my system, but I hope

[R] Selecting cell values with XLSX package

2015-04-23 Thread samarvir singh
Hello, I am working with some 2700 files in .xlsx format Like the one attached below I want to transform all tabular data to a single row as shown below in example or in attachment so that all data can be used as a variable. and replicate all to make a single csv file which has all the data

Re: [R] Selecting cell values with XLSX package

2015-04-23 Thread Jim Lemon
Hi samarvir, Your attachment didn't make it through the list filter. From your example, you seem to want something like this: # assume you are using the readxl package to read the data in mydf-read_excel(mydata.xlsx,col_types=rep(character,11)) mydatavector-as.vector(as.matrix(mydf)) This is

[R] Hmisc::rcorr inconsistency?

2015-04-23 Thread Keith.Jewell
(Copied to maintainer) I'm not going to say there's an error in such an established and respected package but I think there's an inconsistency between the help text and the example: ?rcorr snip Value snip The diagonals of n are the number of non-NAs for the single variable