Re: [R] plot numeric vs character

2016-03-19 Thread MacQueen, Don
Try require(lattice) dotplot(num ~ let, data=mydf) -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 3/17/16, 3:29 AM, "R-help on behalf of Ivan Calandra"

Re: [R] dev.new() throws error from command line

2016-03-19 Thread Bert Gunter
1. This is just a semi-educated guess on my part -- hopefully you'll get a better response from someone else. But consider: 2. Read carefully the "dev.new" section of ?dev. My guess on that basis is that the default given by getOption("device") is set in your R window, but not in a command line

Re: [R] How to reach the column names in a huge .RData file without loading it

2016-03-19 Thread Jan T Kim
On Wed, Mar 16, 2016 at 03:18:27PM -0400, Duncan Murdoch wrote: > On 16/03/2016 1:40 PM, Jan Kim wrote: > >Barry: that's an interesting hack. > > > >I do feel compelled to make two comments, though, regarding the > >general issue rather than the scraping idea: > > > >(1) If your situation is that

Re: [R] [FORGED] ERROR in make.link(link)

2016-03-19 Thread Rolf Turner
On 18/03/16 09:47, CHIRIBOGA Xavier wrote: Dear all, I am using R version 3.1.3. I want to run this model: m1<-glmer(hours~soil*volatile+(1|replicate), data=data,family=Gamma(link = "inv")) But I got this: Erreur within make.link(link) : 'inv' link not recognised What to do in this

Re: [R] How to speed up R program

2016-03-19 Thread MacQueen, Don
You can start with ?Rprof which can help you find out what steps in your calculations are taking the most time. Depending on what, exactly, you're doing, look for places where you're using a data frame when a matrix would serve the purpose. Data frames have more overhead than matrices. Sarah

[R-es] Instalar 'swirl'

2016-03-19 Thread Manuel Máquez
Estimado Carlos: Como siempre haz respondido con mucha rapidez, muchas gracias. Hice ya el intento, abrí la terminal y escribí pkg-config --libs libcurl, pero el sistema responde: Package libcurl was not found in the pkg-config search path. Perhaps you should add the directory containing

Re: [R] What "method" does sort() use?

2016-03-19 Thread Patrick Connolly
I did look at the Comparison help but totally overlooked this part; Comparison of strings in character vectors is lexicographic within the strings using the collating sequence of the locale in use: see ‘locales’. The collating sequence of locales such as ‘en_US’ is normally

Re: [R] How to reach the column names in a huge .RData file without loading it

2016-03-19 Thread Lida Zeighami
Thank you Bert and Frederic. On Wed, Mar 16, 2016 at 11:52 AM, Bert Gunter wrote: > Is it really a .Rdata file? If so, the answer is no, AFAIK, since > .Rdata files are serialized (binary) versions of e.g. worksheets that > can contain many different data objects.

Re: [R] How to reach the column names in a huge .RData file without loading it

2016-03-19 Thread Duncan Murdoch
On 16/03/2016 1:40 PM, Jan Kim wrote: Barry: that's an interesting hack. I do feel compelled to make two comments, though, regarding the general issue rather than the scraping idea: (1) If your situation is that that image (.RData file) is the only copy of the data, you'll need to rescue the

[R] sample within a loop

2016-03-19 Thread DIGHE, NILESH [AG/2362]
Dear R users, My data frame has four "groups" namely A1, B2, C3, & D4. Each group has 12 rows (variable "plotno). I like to randomly sample one "plotno" within each "groups" variable and label it as "CONTROL" and label others as "TEST" in a new variable called "entry". I am

Re: [R] Reshaping an array - how does it work in R

2016-03-19 Thread Dénes Tóth
Hi Roy, R (usually) makes a copy if the dimensionality of an array is modified, even if you use this syntax: x <- array(1:24, c(2, 3, 4)) dim(x) <- c(6, 4) See also ?tracemem, ?data.table::address, ?pryr::address and other tools to trace if an internal copy is done. Workaround: use

Re: [R-es] Instalar 'swirl'

2016-03-19 Thread Carlos Ortega
Hola, "swirl" depende de que tengas instalado los paquetes: "RCurl" y "httr". Pero "RCurl" no se puede instalar porque no tienes instalada una librería (libcurl) de "Ubuntu". Entonces: - Instala primero "libcurl" con: pkg-config --libs libcurl - Y luego prueba a instalar el paquete

Re: [R] R / G GUI freezes saving plot

2016-03-19 Thread Jordan Meyer
Are there any particular types of plotting you are doing when it becomes unresponsive? If so, it would be helpful to see an example. On Fri, Mar 18, 2016 at 5:45 AM, Daniel Preciado wrote: > Randomly, whenever I try to save a plot, R becomes unresponsive and has to > be

Re: [R] How To Start R Studio After Installation

2016-03-19 Thread Jordan Meyer
Forgot to reply to list... On Mar 19, 2016 6:09 PM, "Jordan Meyer" wrote: > I'd you used a different administrator account on your (Windows) computer > during installation, you may have unintentionally installed it only for > that account. (For example, you used an

Re: [R] Persistent state in a function?

2016-03-19 Thread Duncan Murdoch
On 19/03/2016 12:45 PM, Boris Steipe wrote: Dear all - I need to have a function maintain a persistent lookup table of results for an expensive calculation, a named vector or hash. I know that I can just keep the table in the global environment. One problem with this approach is that the

Re: [R] Typographical error in the documentation of function strwidth?

2016-03-19 Thread peter dalgaard
I don't think so. I'll give you that it should either be the (number of lines - 1)*spacing or (number of linefeeds)*spacing, but it's correct to count the height of "M" only on the top line. -pd It is correct as written > On 16 Mar 2016, at 22:39 , ALBERTO VIEIRA FERREIRA MONTEIRO >

Re: [R] About calculation of the gravity model in R and STATA software

2016-03-19 Thread peter dalgaard
On 16 Mar 2016, at 14:10 , S Ellison wrote: >> As you can see, model coefficients (second column in the results table) are >> the >> same at least until the 4th mark (!) However, other results (columns in the >> table of results, since the third) is not the same. >>

Re: [R] What "method" does sort() use?

2016-03-19 Thread peter dalgaard
Ooops, that was answering the question you actually asked. The one you meant to ask is answered by this part: The sort order for character vectors will depend on the collating sequence of the locale in use: see Comparison. ...and collating sequences is a weird and woolly subject, where you

Re: [R] degree sign

2016-03-19 Thread Cathy Lee Gierke
My actual plot call is long and complicated, so I tried to simplify it in the last message.here is the actual, using David's proposed solution. It is not working. What I want to see printed is the following (with degree symbols after 73 and 296). Since I reuse this string in various ways, I

Re: [R] How To Start R Studio After Installation

2016-03-19 Thread KMNanus
If you’re on a mac, just go into finder, then applications. highlight R studio and drag it to the dock. Then double-click it and r studio should start. If you’re on Windows, I don’t have a clue. Ken kmna...@gmail.com 914-450-0816 (tel) 347-730-4813 (fax) > On Mar 19, 2016, at 10:09 AM,

[R] Orthogonal Nonlinear Least-Squares Regression in R

2016-03-19 Thread Lorenzo Isella
Dear All, I am trying my hands at orthogonal least square regression. Have a look for instance at http://bit.ly/1pB2aHX https://cran.r-project.org/web/packages/onls/index.html http://bit.ly/1XDkkTL docs.scipy.org/doc/external/odrpack_guide.pdf However, I am experiencing some problems with a

[R] merge small clusters in R

2016-03-19 Thread Sheila the angel
In R, I have cut a dendrogram into clusters. However some of the clusters have only few samples. How can I merge the small clusters with nearest big cuter. hc <- hclust(dist(USArrests)) plot(hc, cex = 0.6) rect.hclust(hc, k = 4, border = 2:5) It gives one cluster with only 2 samples. How can I

Re: [R] Circular Statistic in R

2016-03-19 Thread David L Carlson
The circular() function sets the details of your circular data. Mathematicians think in terms of radians that begin at 3 o'clock and proceed counterclockwise which I believe is the default. Geographers think in terms of degrees that begin at 12 o'clock and proceed clockwise. Unless you get all

Re: [R] How to reach the column names in a huge .RData file without loading it

2016-03-19 Thread Frederic Ntirenganya
I am not sure whether it is possible to get a column name from a dataset without reading the data. Checked by Avast Antivirus. www.avast.com

Re: [R] About calculation of the gravity model in R and STATA software

2016-03-19 Thread S Ellison
> As you can see, model coefficients (second column in the results table) are > the > same at least until the 4th mark (!) However, other results (columns in the > table of results, since the third) is not the same. > Could you explain differences in the results? R and stata are clearly doing

Re: [R] How to reach the column names in a huge .RData file without loading it

2016-03-19 Thread Bert Gunter
Is it really a .Rdata file? If so, the answer is no, AFAIK, since .Rdata files are serialized (binary) versions of e.g. worksheets that can contain many different data objects. "colnames" has no meaning in this context. Corrections welcome if I have it wrong! Cheers, Bert Bert Gunter "The

Re: [R] Confidence Interval for Ipred Bagging outputs ?

2016-03-19 Thread David Winsemius
> On Mar 19, 2016, at 12:36 AM, Majid Javanmard > wrote: > > Hello everyone > > here is the code that implements bagging using ipred package in R : > > library(ipred) > library(mlbench) > data("BostonHousing") > # Test set error (nbagg=25, trees pruned): 3.41

[R] plot numeric vs character

2016-03-19 Thread Ivan Calandra
Dear useRs, I would like to plot data points in a simple scatterplot. I don't have a lot of data per category, so a boxplot does not make sense. Here are some sample data: mydf <- data.frame(let=rep(letters[1:3],each=3), num=rnorm(9), stringsAsFactors=FALSE) I would like to do that, which

Re: [R] Warning message: Computation failed in `stat_bin()`: attempt to apply non-function

2016-03-19 Thread shahab
Thanks all for the help. Yes it works now, my stupid mistake. On Friday, 18 March 2016, John Kane wrote: > > ggplot(x=aes(friend_count), data=pf) + geom_histogram() > > The x= in the above statement is wrong > > ggplot(aes(friend_count), data=pf) + geom_histogram() > will

Re: [R] sample within a loop

2016-03-19 Thread Mohammad Tanvir Ahamed via R-help
Hi, you can try df1<-split(df,df$groups) lapply(df1, function(x) { x<-cbind(x,entry=0) sam <- sample(x$plotno,1) x$entry[which(x$plotno==sam)]<-"CONTROL" x$entry[which(!x$plotno==sam)]<-"TEST" x } ) Tanvir Ahamed Göteborg, Sweden | mashra...@yahoo.com

Re: [R] Persistent state in a function?

2016-03-19 Thread Erich Neuwirth
package memoise might help you > On 19 Mar 2016, at 17:45, Boris Steipe wrote: > > Dear all - > > I need to have a function maintain a persistent lookup table of results for > an expensive calculation, a named vector or hash. I know that I can just keep > the table

Re: [R] How To Start R Studio After Installation

2016-03-19 Thread John Kane
What is your operating system? John Kane Kingston ON Canada > -Original Message- > From: prasad.prasad.k...@gmail.com > Sent: Sat, 19 Mar 2016 19:39:35 +0530 > To: r-help@r-project.org > Subject: [R] How To Start R Studio After Installation > > Hello, > > I am new to 'R' and just

Re: [R] Persistent state in a function?

2016-03-19 Thread Bert Gunter
Use an environment to hold your table. ?new.env or ?local (I leave it to you to work out details) Cheers, 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 )

Re: [R] sample within a loop

2016-03-19 Thread MacQueen, Don
I would change strategies. Create a new variable, say, num.in.grp <- rep(1:12, 4) Then sample from 1:12, and add appropriate amounts so that they become row numbers within the four sets of 12 rows ctrls <- ssample(1:12, 4, replace=TRUE) + c(0,12,24,36) Now that we have four random row

Re: [R-es] Cambiar \u

2016-03-19 Thread Jorge I Velez
Muchas gracias a Luisfo y Milagros por las respuestas. Ambas soluciones funcionaron a la perfección. Saludos cordiales, Jorge.- 2016-03-17 2:00 GMT-05:00 Luisfo Chiroque : > Buenas Jorge, > > Creo que esta linea te podria servir: > gsub('[^[:alnum:]]', '', words) >

[R] Persistent state in a function?

2016-03-19 Thread Boris Steipe
Dear all - I need to have a function maintain a persistent lookup table of results for an expensive calculation, a named vector or hash. I know that I can just keep the table in the global environment. One problem with this approach is that the function should be able to delete/recalculate the

Re: [R] Exporting Commands and Results

2016-03-19 Thread Jeff Reichman
Perfect!!! From: Anders Alexandersson [mailto:andersa...@gmail.com] Sent: Saturday, March 19, 2016 6:26 AM To: reichm...@sbcglobal.net Subject: Re: [R] Exporting Commands and Results https://codeandculture.wordpress.com/2014/10/09/what-is-the-word-for-log-in-r/ On Fri, Mar 18, 2016

[R] How To Start R Studio After Installation

2016-03-19 Thread Prasad Kale
Hello, I am new to 'R' and just now installed R as well as 'R Studio' on my personal desktop. Firstly I have downloaded R and I am able open the same as well. Afterwords I have downloaded and installed the 'R Studio' but i don't know from where I can open the 'R Studio'. As I am not finding a

[R] summation involving multiple summations

2016-03-19 Thread Mahmoud via R-help
Dear R Experts I've a function which involves multiple summations, and the number of summations depends on a random variable named (n-r), where n is known but r is random and rn_r=3 >fx=function(x)sum(sapply(1:n_r, function(j1) {sum(sapply(1:(j1), >function(j2){sum(sapply(1:(j2),

[R] Confidence Interval for Ipred Bagging outputs ?

2016-03-19 Thread Majid Javanmard
Hello everyone here is the code that implements bagging using ipred package in R : library(ipred) library(mlbench) data("BostonHousing") # Test set error (nbagg=25, trees pruned): 3.41 (Breiman, 1996a, Table 8) mod <- bagging(medv ~ ., data=BostonHousing, coob=TRUE) print(mod) pred <-

Re: [R] Reshaping an array - how does it work in R

2016-03-19 Thread Roy Mendelssohn - NOAA Federal
> On Mar 19, 2016, at 8:18 AM, Henrik Bengtsson > wrote: > > On Fri, Mar 18, 2016 at 8:28 PM, Roy Mendelssohn - NOAA Federal > wrote: >> Hi Henrik: >> >> I want to do want in oceanography is called an EOF, which is just a PCA >>

[R-es] Hoy "Reunión del Grupo de Usuarios de R de Madrid"...

2016-03-19 Thread Carlos Ortega
Hola, Hoy tenemos reunión del "Grupo de Usuarios de R de Madrid", por si alguno está interesado en asistir y todavía no estaba informado de la reunión: http://www.meetup.com/es-ES/Grupo-de-Usuarios-de-R-de-Madrid/events/229050729/ Gracias,​ ​ Carlos Ortega www.qualityexcellence.es

Re: [R] Reshaping an array - how does it work in R

2016-03-19 Thread Henrik Bengtsson
On Fri, Mar 18, 2016 at 8:28 PM, Roy Mendelssohn - NOAA Federal wrote: > Hi Henrik: > > I want to do want in oceanography is called an EOF, which is just a PCA > analysis. Unless I am missing something, in R I need to flatten my 3-D matrix > into a 2-D data matrix. I

Re: [R] Exporting Commands and Results

2016-03-19 Thread Jordan Meyer
You may want to try sink(filename, split=TRUE). If you have particularly lengthy commands that you wish to save, you can run your syntax file using source(filename, echo=TRUE, max.deparse.length=Inf) to keep R from truncating the commands. On Mar 19, 2016 10:59 AM, "Bert Gunter"

Re: [R] Exporting Commands and Results

2016-03-19 Thread Bert Gunter
?savehistory may also be relevant, depending on what you wish to do and how hard you want to work. Cheers, 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 )

Re: [R-es] Rsqlite

2016-03-19 Thread Javier Marcuzzi
Estimado Jorge Ayuso Rejas Muchas gracias, problema solucionado Javier Rubén Marcuzzi De: Jorge Ayuso Rejas Enviado: miércoles, 16 de marzo de 2016 6:21 Para: Javier Marcuzzi CC: r-help-es@r-project.org Asunto: Re: [R-es] Rsqlite Prueba con: library(RSQLite) con <- dbConnect(SQLite(),

Re: [R] Plot help

2016-03-19 Thread Jim Lemon
Hi Andre, Try this: plot(x= Index, y=Values, ylim= c(-16,16), pch= 19, col = "blue",yaxt="n") points (Log, pch = 19, col="green") axis(2,at=seq(-16,16,by=4)) Jim On Thu, Mar 17, 2016 at 8:32 AM, André Luis Neves wrote: > Dear all: > > > I was wondering how I modify the

[R] Warning message: Computation failed in `stat_bin()`: attempt to apply non-function

2016-03-19 Thread shahab
Hi, I am trying to plot a sample dataset using ggplot2, but I am keep getting the following error message and an empty plot! Apparently something is wrong in the dataset, but what? R : pf<-read.csv('pseudo_facebook.tsv', sep='\t') ggplot(x=aes(friend_count), data=pf) + geom_histogram()

Re: [R] Typographical error in the documentation of function strwidth?

2016-03-19 Thread ALBERTO VIEIRA FERREIRA MONTEIRO
Peter Dalgaard wrote: > I don't think so. I'll give you that it should either be the (number of lines > - 1)*spacing > or (number of linefeeds)*spacing, but it's correct to count the height of "M" > only on the top line. > > -pd > > It is correct as written > Ah, ok, I see now. The "line

Re: [R] Exporting Commands and Results

2016-03-19 Thread John Kane
Perhaps knitr (http://yihui.name/knitr/)? John Kane Kingston ON Canada > -Original Message- > From: reichm...@sbcglobal.net > Sent: Fri, 18 Mar 2016 17:00:00 -0500 > To: r-help@r-project.org > Subject: [R] Exporting Commands and Results > > R-Users > > > > I know sink("filename")

Re: [R] plot numeric vs character

2016-03-19 Thread Ivan Calandra
That does the trick with base functions! Thanks Dennis. Ivan -- Ivan Calandra, PhD University of Reims Champagne-Ardenne GEGENAA - EA 3795 CREA - 2 esplanade Roland Garros 51100 Reims, France +33(0)3 26 77 36 89 ivan.calan...@univ-reims.fr -- https://www.researchgate.net/profile/Ivan_Calandra

[R] Reshaping an array - how does it work in R

2016-03-19 Thread Roy Mendelssohn - NOAA Federal
Hi All: I am working with a very large array. if noLat is the number of latitudes, noLon the number of longitudes and noTime the number of time periods, the array is of the form: myData[noLat, no Lon, noTime]. It is read in this way because that is how it is stored in a (series) of netcdf

Re: [R] plot numeric vs character

2016-03-19 Thread PIKAL Petr
Hi It would be easier if mydf$let was factor plot(as.numeric(factor(mydf$let)), mydf$num, xaxt="n") axis(1, at=1:3, levels(factor(mydf$let))) Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Ivan > Calandra > Sent: Thursday, March 17,

Re: [R] plot numeric vs character

2016-03-19 Thread Boris Steipe
And let me add the generalized solution - if you don't have just single letters in the column: plot(match(mydf$let, names(table(mydf$let))), mydf$num) Cheers, Boris On Mar 17, 2016, at 8:45 AM, Boris Steipe wrote: > This: > > plot(match(mydf$let, letters),

Re: [R] How to reach the column names in a huge .RData file without loading it

2016-03-19 Thread Jan Kim
Barry: that's an interesting hack. I do feel compelled to make two comments, though, regarding the general issue rather than the scraping idea: (1) If your situation is that that image (.RData file) is the only copy of the data, you'll need to rescue the data from that as soon as possible

[R] What "method" does sort() use?

2016-03-19 Thread Patrick Connolly
I don't follow why this happens: > sort(c(LETTERS[1:5], letters[1:5])) [1] "a" "A" "b" "B" "c" "C" "d" "D" "e" "E" The help for sort() says: method: character string specifying the algorithm used. Not available for partial sorting. Can be abbreviated. But what are the methods

Re: [R] (no subject)

2016-03-19 Thread Sheila the angel
Have you tried install.packages("pbkrtest") On 13 March 2016 at 17:56, Sudhansu Senapati wrote: > I have loaded "caret" package to my R successfully with dependencies=TRUE. > But when I go to library(caret), some namespaces are not loaded. > > library(caret) > Loading

Re: [R] merge small clusters in R

2016-03-19 Thread Boris Steipe
This is not a well defined question, until your notions of "small" and "nearest" are defined. In your specific example rect.hclust(hc, k = 3, border = 2:5) ... will do what you are asking for. This is not likely to work in the general case - imagine that your cluster of size two only meets

Re: [R] plot numeric vs character

2016-03-19 Thread Boris Steipe
This: plot(match(mydf$let, letters), mydf$num) :-) On Mar 17, 2016, at 6:48 AM, PIKAL Petr wrote: > Hi > > It would be easier if mydf$let was factor > > plot(as.numeric(factor(mydf$let)), mydf$num, xaxt="n") > axis(1, at=1:3, levels(factor(mydf$let))) > > Cheers

[R] Error in if (x[j, g] == x[i, g]) { : missing value where TRUE/FALSE needed

2016-03-19 Thread Chattopadhyay, Somsubhra
I am using the "hydroTSM" package and "trend" package to convert my daily time series into monthly and then analyze the seasonal trend. My code is y <-read.csv("P-GHCNDUSW00093820.csv",as.is=TRUE) y$DATE <- as.Date(as.character(y$DATE),format="%Y%m%d") x <- xts(y$PRCP,y$DATE) p <-

Re: [R] How to reach the column names in a huge .RData file without loading it

2016-03-19 Thread Loris Bennett
Jan T Kim writes: > On Wed, Mar 16, 2016 at 03:18:27PM -0400, Duncan Murdoch wrote: >> On 16/03/2016 1:40 PM, Jan Kim wrote: >> >Barry: that's an interesting hack. >> > >> >I do feel compelled to make two comments, though, regarding the >> >general issue rather than the

[R] Party package: varimp(..., conditional=TRUE) error

2016-03-19 Thread Hehuan Liao
Hello, I'm running up against similar problems as described previously: https://stat.ethz.ch/pipermail/r-help/2011-October/292897.html I've tried to set threshold=0.99, however, I got another error message: "Error: cannot allocate vector of size 52.8 Gb" I tried to run my code on a

[R] R 3.2.4-revised is released

2016-03-19 Thread Peter Dalgaard
The 3.2.4 release had two annoyances which we would rather not have in an "ultra-stable" release, designed to hang around for the duration of the 3.3 series. One was a relatively minor Makefile issue affecting system using R's bundled lzma library. The other, rather more serious, affected

Re: [R] Is not really anybody answer me ????

2016-03-19 Thread David Winsemius
> On Mar 19, 2016, at 12:19 AM, Majid Javanmard > wrote: > > Hello > > I asked a question 3 times, but I got no answer for each of them. You get a decision tree from the bagging function. Precisely what would a confidence interval look like for such a prediction?

Re: [R-es] Hoy "Reunión del Grupo de Usuarios de R de Madrid"...

2016-03-19 Thread Carlos Ortega
Hola, Ya está disponible el material de la sesión (videos y presentaciones): http://madrid.r-es.org/33-jueves-17-de-marzo-2016/ Gracias, Carlos Ortega www.qualityexcellence.es El 17 de marzo de 2016, 10:08, Carlos Ortega escribió: > Hola, > > Hoy tenemos reunión

Re: [R] plot numeric vs character

2016-03-19 Thread Ivan Calandra
Thanks Petr, You're right, no need for points(). But is there an even simpler way? I still find it strange that plot() does not allow points to be plotted instead of boxplots when x is a factor (because boxplots do not always make sense). Is there a good reason for that? Ivan -- Ivan

Re: [R] plot numeric vs character

2016-03-19 Thread Ivan Calandra
So it looks like there is no better "base" solution than Petr's code... Thank you for your input anyway! Ivan -- Ivan Calandra, PhD University of Reims Champagne-Ardenne GEGENAA - EA 3795 CREA - 2 esplanade Roland Garros 51100 Reims, France +33(0)3 26 77 36 89 ivan.calan...@univ-reims.fr --

Re: [R] How to reach the column names in a huge .RData file without loading it

2016-03-19 Thread Richard M. Heiberger
Barry's solution works with Windows without cygwin. You do need Rtools, available from the Windows page on CRAN Rtools does not have "gunzip", but that is just an abbreviation for "gzip -d". x:\HOME\rmh\HH-R.package>path path

[R] Error with fortify() and and incorrect output of facet_wrap when plotting spatial census data

2016-03-19 Thread Bharath Sivaram
I am trying to plot the US census data using ggplot2. I was able to plot the data for one specific year ( all states) and generate the map with correct data. When I try to combine a couple of years together to analyse the trend over a period, I am getting errors with both Fortify and facet_wrap.

[R] Interpretation of Coefficients of GAM

2016-03-19 Thread John Liu
Hi all, May I have a question on how to interpret the coefficients from GAM. We used GAM to get propensity scores, fitting model as below, fit <- gam(group~agegroup+s(GA_Enr)+race+edugroup, data = datax, family='binomial') where �group� is a binary variable for treatment(y/n)

Re: [R] variable selection using residual difference

2016-03-19 Thread Bert Gunter
Suggestion: Don't do this! I suggest that you consult with a local statistician or post to a statistical website like stats.stackexchange.com for what might be sensible procedures for variable selection (a complex and controversial topic!) and why what you propose is or is not a good idea (don't

Re: [R] Typographical error in the documentation of function strwidth?

2016-03-19 Thread peter dalgaard
On 17 Mar 2016, at 14:27 , ALBERTO VIEIRA FERREIRA MONTEIRO wrote: > Peter Dalgaard wrote: > >> I don't think so. I'll give you that it should either be the (number of >> lines - 1)*spacing >> or (number of linefeeds)*spacing, but it's correct to count the height of

Re: [R-es] maps

2016-03-19 Thread Karel L.
Hola Matías: La verdad es que tener los puntos ayudaría ... ¿Es esto lo que quieres hacer? (última línea, extraes las coordenadas y pintas las etiquetas). library(maps) library(mapdata) library(maptools) library(sp) ### Creación de datos de muestra ## Poly base

Re: [R] Is not really anybody answer me ????

2016-03-19 Thread Tsjerk Wassenaar
Hi Majid, Maybe no one knew the answer, or the question was not understood. There's no central board assigning questions to answerers, so sometimes questions do not find one. You don't have a right to get an answer, but you ask someone to invest time and do you a favor. Maybe this can be of some

[R] Typographical error in the documentation of function strwidth?

2016-03-19 Thread ALBERTO VIEIRA FERREIRA MONTEIRO
There might be a minor typographical error in the documentation of the function strwidth, namely, from ?strwidth we get: "Note that the ‘height’ of a string is determined only by the number of linefeeds ("\n") it contains: it is the (number of linefeeds - 1) times the line spacing plus the

Re: [R] plot numeric vs character

2016-03-19 Thread John Kane
Another approach using ggplot2 and shamelessly swiped from http://www.sthda.com/english/wiki/ggplot2-dot-plot-quick-start-guide-r-software-and-data-visualization. library(ggplot2) ggplot(mydf, aes(x=let, y=num)) + geom_dotplot(binaxis='y', stackdir='center', dotsize = 0.5) John Kane

[R] Is not really anybody answer me ????

2016-03-19 Thread Majid Javanmard
Hello I asked a question 3 times, but I got no answer for each of them. Thanks to R mailing list [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

Re: [R] ERROR in make.link(link)

2016-03-19 Thread David Winsemius
> On Mar 17, 2016, at 1:47 PM, CHIRIBOGA Xavier > wrote: > > Dear all, > > > I am using R version 3.1.3. I want to run this model: > > m1<-glmer(hours~soil*volatile+(1|replicate), data=data,family=Gamma(link > = "inv")) > > > But I got this: > > Erreur

Re: [R] Circular Statistic in R

2016-03-19 Thread David L Carlson
It is always hard to diagnose unspecified "problems", but it should not matter. You do need to use statistical methods specifically designed for circular data. Even simple descriptive statistics such as the mean, standard deviation, and variance require special functions. Try package circular.

[R] How to reach the column names in a huge .RData file without loading it

2016-03-19 Thread Lida Zeighami
Hi, I have a huge .RData file and I need just to get the colnames of it. so is there any way to reach the column names without loading or reading the whole file? Since the file is so big and I need to repeat this process several times, so it takes so long to load the file first and then take the

Re: [R] degree sign

2016-03-19 Thread Uwe Ligges
On 18.03.2016 21:58, Cathy Lee Gierke wrote: I have searched and tried many things but cannot get anything to work. I just want to print out a degree sign after a the Orthophase number. The following list of "xl" values are all ones I have tried. Granted they are not what I want, but I have

Re: [R] How to save an object in a function

2016-03-19 Thread David Winsemius
> On Mar 18, 2016, at 11:18 PM, Prashobh Palakkeel wrote: > > This is the code for permutations from the package "gtools" > > fn_perm_list <- > function (n, r, v = 1:n) > { >if (r == 1) > matrix(v, n, 1) >else if (n == 1) > matrix(v, 1, r) >else { >

[R] variable selection using residual difference

2016-03-19 Thread Hassan, Nazatulshima
I have the following example dataset set.seed(2001) n <- 100 Y <- c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) X1 <- sample(x=c(0,1,2),

[R] how to calculate spatial correlation between two data sets

2016-03-19 Thread Yogesh Tiwari via R-help
Dear R Users, I am using R on Windows. 1) How to calculate spatial correlation between point observation at one location and model simulated data over some particular region. For example, observation is at only one location 18N, 72 E and model is at 0.5x0.5 grid. So how to calculate correlation

[R] How to save an object in a function

2016-03-19 Thread Prashobh Palakkeel
This is the code for permutations from the package "gtools" fn_perm_list <- function (n, r, v = 1:n) { if (r == 1) matrix(v, n, 1) else if (n == 1) matrix(v, 1, r) else { X <- NULL for (i in 1:n) X <- rbind(X, cbind(v[i], fn_perm_list(n - 1, r - 1, v[-i])))

[R] Exporting Commands and Results

2016-03-19 Thread Jeff Reichman
R-Users I know sink("filename") will export my results to a file but how do I export both commands and results in R? Jeff [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

[R] degree sign

2016-03-19 Thread Cathy Lee Gierke
I have searched and tried many things but cannot get anything to work. I just want to print out a degree sign after a the Orthophase number. The following list of "xl" values are all ones I have tried. Granted they are not what I want, but I have tried them all, and none of them print out a

Re: [R] [FORGED] ERROR in make.link(link)

2016-03-19 Thread Kwamme Yeboah
Can I pls see your data, Xavier? On Thu, Mar 17, 2016 at 9:11 PM, Rolf Turner wrote: > [image: Boxbe] Rolf Turner ( > r.tur...@auckland.ac.nz) is not on your Guest List >