Re: [R] Transformation of the circular variable into linear variable

2015-05-06 Thread Martin Maechler
David Winsemius dwinsem...@comcast.net on Tue, 5 May 2015 08:41:08 -0700 writes: On May 5, 2015, at 3:59 AM, Nasr Al-Dhurafi wrote: Dear All I am working with a circular data ( wind direction ) and i have problem in transforming the circular variable into linear

Re: [R] does segfault mean (always) a bug?

2015-05-06 Thread lejeczek
On 06/05/15 09:32, Martin Maechler wrote: Duncan Murdoch murdoch.dun...@gmail.com on Tue, 5 May 2015 15:36:59 -0400 writes: On 05/05/2015 2:54 PM, lejeczek wrote: hi eveybody I'm trying something simple (Biocunductor packages), so simple I believe it's example

Re: [R] does segfault mean (always) a bug?

2015-05-06 Thread lejeczek
On 05/05/15 20:36, Duncan Murdoch wrote: On 05/05/2015 2:54 PM, lejeczek wrote: hi eveybody I'm trying something simple (Biocunductor packages), so simple I believe it's example from docs but I get segfault. I don't suppose incorrect scripting can cause segfault, right? In R, a segfault

Re: [R] Plot by FIPS Code using Shapefiles

2015-05-06 Thread Corey Sparks
Joining data the way you're doing it is dangerous, Roger Bivand and others describes a standard way to do this process here: http://r-sig-geo.2731867.n2.nabble.com/Merging-shapefiles-and-csv-td7586839.html And I do an example using US Census data here, using merge():

[R] R write to JSON format error

2015-05-06 Thread robby0524
Dear all There are a stardand JSON format file from R code. It have a error on this file. How to modify this source code for a stardand JSON format file? Test1: Soure code for R studio: Issue_Name-c(Tag over 30% in minutes)

Re: [R] predict function in regression analysis

2015-05-06 Thread Stéphane Adamowicz
Maybe this is what you wanted : Data - structure(list(y = c(4.5, 4.5, 4.7, 6.7, 6, 4.4, 4.1, 5.3, 4, 4.2, 4.1, 6.4, 5.5, 3.5, 4.6, 4.1, 4.6, 5, 6.2, 5.9, 3.9, 5.3, 6.9, 5.7), lot = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L), duration =

Re: [R] Plot by FIPS Code using Shapefiles

2015-05-06 Thread Roger Bivand
Corey Sparks corey.sparks at utsa.edu writes: Joining data the way you're doing it is dangerous, Roger Bivand and others describes a standard way to do this process here: http://r-sig-geo.2731867.n2.nabble.com/Merging-shapefiles-and-csv-td7586839.html Quite right - the chunks Corey is

[R] Package Build Recommendations

2015-05-06 Thread Glenn Schultz
Hi All, I have my R package built and it passes the CRAN tests.  Now, I have a question.  The file structure is not standard.  There are addition data files as follows outlined below.  Each, if you will, represents separation of concerns with respect to structured securities like MBS and

Re: [R] does segfault mean (always) a bug?

2015-05-06 Thread Martin Maechler
Duncan Murdoch murdoch.dun...@gmail.com on Tue, 5 May 2015 15:36:59 -0400 writes: On 05/05/2015 2:54 PM, lejeczek wrote: hi eveybody I'm trying something simple (Biocunductor packages), so simple I believe it's example from docs but I get segfault. I don't

Re: [R] Rgraphviz and NA indices error

2015-05-06 Thread lubin.lemarch...@bnpparibas-pf.com
Hello, I ran into the same error. From what I understood, if the code : plot(dtm, terms=findFreqTerms(dtm, lowfreq=100) [1:30], corThreshold=0.75) gives you this message it's because there aren't 30 terms which happens at least a hundred times in your corpus. Therefore you

Re: [R] does segfault mean (always) a bug?

2015-05-06 Thread Martin Maechler
lejeczek pelj...@yahoo.co.uk on Wed, 6 May 2015 08:20:46 +0100 writes: On 05/05/15 20:36, Duncan Murdoch wrote: On 05/05/2015 2:54 PM, lejeczek wrote: hi eveybody I'm trying something simple (Biocunductor packages), so simple I believe it's example from docs

Re: [R] Need Help!

2015-05-06 Thread Kehl Dániel
Hi, type res #ENTER (now it contains your results as a vector) or head(res) #so you only see the first couple of values or plot(res) #to see a basic plot (you could set axis labels etc, but I suggets you to go ahead and read a tutorial on R! Best, have a great time with R, kd

Re: [R] lm model exported from R to excel

2015-05-06 Thread PIKAL Petr
Hi AFAIK result of lm model is a list so you cannot expect easy direct output to Excel. List of 12 $ coefficients : Named num 61.2 ..- attr(*, names)= chr cas $ residuals: Named num [1:2] 0 0 ..- attr(*, names)= chr [1:2] 1 2 $ effects : Named num [1:2] -61.2 0 ..- attr(*,

Re: [R] Plot by FIPS Code using Shapefiles

2015-05-06 Thread Shouro Dasgupta
Dear Anthony, Thanks again for your reply. The following worked for merge: merged_data - merge(shapes_fips,max_change,by=FIPS,all.x=T, all.y=F) However, I think I am doing something wrong - as I have 3109 FIPS code in my original data but when I merge with the shapes file

Re: [R] lm model exported from R to excel

2015-05-06 Thread Jim Lemon
Hi Livia, One way is to use the delim.table function in the prettyR package. See the examples, in particular the final one. The resulting TAB delimited file will usually import directly into Excel. Jim On Wed, May 6, 2015 at 7:36 PM, Livia Maria Vestergaard lves...@student.sdu.dk wrote: Hi all

Re: [R] MOnth over Month Variance in %

2015-05-06 Thread John Kane
I think we need to know a bit about your level of knowledge of R, what the data currently looks like (In R format preferably) and maybe see what you have tried so far. Please have a look at the following link, and pay particular attention to the use of dput() as a way to present data on

Re: [R] lm model exported from R to excel

2015-05-06 Thread Duncan Mackay
If you know some basic html language you can jazz up the table headings to your liking by writing that before the xtable statement. It save having to muck around in Microsoft to fix it. If you are going to do a lot of it - a little study of html basics can go far. I was changing the headings to

Re: [R] Mantel test

2015-05-06 Thread David L Carlson
Please keep the discussion on the list. It is hard to answer your question without context. You give us a warning message from a function that is not in base R. Perhaps it is in package ade? You also don’t include anything about the data or the commands that produced the warning message. A dist

[R] Decomposing irregular time series

2015-05-06 Thread Jue Lin-Ye
​Dear fellow members of the r-help list, ​May someone be so kind as to point out​ how an irregular time series should be decomposed into season and trend? My code, the related error and my data are enclosed herein. ​Best regards and thanks in advance! ​-- Jue​

Re: [R] MOnth over Month Variance in %

2015-05-06 Thread Jeff Newmiller
It seems like the ?diff function might be useful here, but without a reproducible example (at the very least some data provided as dput output and results of your Excel calculations for that data) we would have to guess quite a bit and likely be wrong. Take the recommendations at [1] to heart

[R] MOnth over Month Variance in %

2015-05-06 Thread Shivi82
Hi All, I have data based on truck load for various states. The data points range from Oct'14 To Mar'15. Now I need to know what was the difference in load in Nov as compared to Oct in both real numbers as well as in %. Similarly for all the month in comparison to the previous month. I am able to

[R] lm model exported from R to excel

2015-05-06 Thread Livia Maria Vestergaard
Hi all I all. I am wondering whether anybody know how to export an output of an lm model from R to excel in order to have excel recognize the table that comes and divide the numbers in the table into columns and rows? I really hope it is possible? :) Best Livia

Re: [R] lm model exported from R to excel

2015-05-06 Thread Duncan Mackay
Hi Livia There are several html packages that ?could also do it Heres a way with xtable library(xtable) y = rnorm(100) x= rnorm(100)+rnorm(100) mod - lm(y ~x) # latex example easy view xtable(mod) # html file.create(lm.htm) ff - file(lm.htm, a+) fchars - print(xtable(mod),type = html)

Re: [R] does segfault mean (always) a bug?

2015-05-06 Thread William Dunlap
It looks like a problem in the Matrix package. I made the file KE.rda containing the Matrix objects K and E constructed in calc.diffusion.kernel by adding a save() call just before where R dies in the original example: K = lam$values[1] * I - M E = I - matrix(1, ncol = ncol(I),

Re: [R] Drawing the regression line and the 95% confidence intervals

2015-05-06 Thread Jim Lemon
Hi Sacha, As Brian noted, you will have to expand the vertical axis. Here is one way to do it. plot(GDP.per.head, fitted(LinearModel.1),ylim=c(-60,1200)) devlm1-lm(fitted(LinearModel.1)~GDP.per.head) abline(devlm1) conflm1-confint(devlm1) abline(coef=conflm1[,1],lty=2)

Re: [R] Drawing the regression line and the 95% confidence intervals

2015-05-06 Thread varinsacha
Jim, Perfect Many thanks once more for your support... Best regards SV Envoyé de mon iPhone Le 7 mai 2015 à 00:01, Jim Lemon drjimle...@gmail.com a écrit : Hi Sacha, As Brian noted, you will have to expand the vertical axis. Here is one way to do it. plot(GDP.per.head,

[R] Special character is graph label

2015-05-06 Thread Robert U
Dear R users, I am having issues finding a special character (and how to insert it) in the lab of a graph axis. Let us say that the label of my axis is X, i would like the X to have a line over it, indicating that it is the mean of X values (i don't even know how to properly state that in

[R] order by which the eigenvalues are presented

2015-05-06 Thread Luis Borda de Agua
Thank you, Bill, for your reply. However, I'm afraid I didn't explain myself properly. Imagine you have a 2x2 matrix Then the eigenvalues lambda_1 and lambda_2 are analytically calculated from lambda_1 = (-b+sqrt(delta))/2a lambda_2 = (-b-sqrt(delta))/2a where delta = b^2-4ac If

Re: [R] order by which the eigenvalues are presented

2015-05-06 Thread Duncan Murdoch
On 06/05/2015 12:58 PM, Luis Borda de Agua wrote: Thank you, Bill, for your reply. However, I'm afraid I didn't explain myself properly. Imagine you have a 2x2 matrix Then the eigenvalues lambda_1 and lambda_2 are analytically calculated from lambda_1 = (-b+sqrt(delta))/2a

Re: [R] Drawing the regression line and the 95% confidence intervals

2015-05-06 Thread varin sacha
Brian, thanks for the precisions. David, many thanks for your code that perfectly works.  Best, Sacha De : David L Carlson dcarl...@tamu.edu À : Cade, Brian ca...@usgs.gov; varin sacha varinsa...@yahoo.fr Cc : R-help Mailing List r-help@r-project.org Envoyé le : Mercredi 6 mai 2015 21h52

Re: [R] lm model exported from R to excel

2015-05-06 Thread David L Carlson
If you are trying to save the html version of the table, Duncan's example can be simplified to print(xtable(mod), type=html, file=lm.html) Open this file in Excel or Word. Alternatively open it in your browser and paste it into Word or Excel. If you are using Windows and Excel, you can

Re: [R] Drawing the regression line and the 95% confidence intervals

2015-05-06 Thread varin sacha
Dear Jim, I really thank you lots, it perfectly works ! The reproducible example is below. Last thing : I can easily get the predictions intervals but I don't get to draw them. If I want to draw on the same graph (the one I already have the confidence intervals) the prediction intervals. I

Re: [R] Drawing the regression line and the 95% confidence intervals

2015-05-06 Thread Cade, Brian
The prediction intervals are likely to be much wider than the confidence intervals so you will need to be sure you scale the yaxis limits large enough to see them. Brian Brian S. Cade, PhD U. S. Geological Survey Fort Collins Science Center 2150 Centre Ave., Bldg. C Fort Collins, CO 80526-8818

Re: [R] Package Build Recommendations

2015-05-06 Thread Duncan Murdoch
On 05/05/2015 8:16 PM, Glenn Schultz wrote: Hi All, I have my R package built and it passes the CRAN tests. Now, I have a question. The file structure is not standard. There are addition data files as follows outlined below. Each, if you will, represents separation of concerns with

Re: [R] Drawing the regression line and the 95% confidence intervals

2015-05-06 Thread David L Carlson
Something like this? # Compute the prediction limits and get their range to set ylim= plim - predict(LinearModel.1, interval = prediction) rnge - c(min(plim[ , 2]), max(plim[ , 3])) plot(GDP.per.head, fitted(LinearModel.1),ylim=rnge) # As before devlm1-lm(fitted(LinearModel.1)~GDP.per.head)

Re: [R] Special character is graph label

2015-05-06 Thread John Kane
Also have a look at http://astrostatistics.psu.edu/su07/R/html/grDevices/html/plotmath.html for a list of terms. Oh and it's called Xbar or X-bar. John Kane Kingston ON Canada -Original Message- From: dcarl...@tamu.edu Sent: Wed, 6 May 2015 16:33:01 + To:

Re: [R] lm model exported from R to excel

2015-05-06 Thread Livia Maria Vestergaard
Hi Duncan Thank you so much - it worked :) Best Livia Fra: Duncan Mackay [dulca...@bigpond.com] Sendt: 6. maj 2015 14:26 Til: R; Livia Maria Vestergaard Emne: RE: [R] lm model exported from R to excel Hi Livia There are several html packages that

Re: [R] Special character is graph label

2015-05-06 Thread David L Carlson
You do this with plotmath (see the manual page, ?plotmath): plot(rnorm(10), rnorm(10), xlab=expression(bar(X))) - David L Carlson Department of Anthropology Texas AM University College Station, TX 77840-4352 -Original Message- From: R-help

Re: [R] Package Build Recommendations

2015-05-06 Thread Charles Determan
Hi Glenn, Generally data files are stored in the 'data' directory. If you visit Hadley's R packages site on the data page (http://r-pkgs.had.co.nz/data.html) this is described quite clearly. You can use the devtools package functions like `use_data` to have data files properly stored in your

Re: [R] lm model exported from R to excel

2015-05-06 Thread Duncan Mackay
At the expense of extra bandwidth. I also like latex + booktabs; hate word I format the table header and footer in latex with extra vertical space between lines and type; output looks more like latex than being cramped from xtable. Thanks anyway to xtable creators -- would be lost without it

[R] package implementing continuous binomial?

2015-05-06 Thread Benjamin Tyner
Hi I'm wondering if anyone is aware of an R package implementing (i.e., providing a pdf, cdf, and/or quantile function) for the continuous binomial distribution? Specifically the one characterized here:

[R] Convert csv to xpt file in R?

2015-05-06 Thread Santosh
Dear Rxperts.. Was wondering if there is a way in R to read a csv file and generate an XPT file? For some reason the function write.xport() does not seem to work for me i get the following error... error in label.data.frame(df,default=): length of default same as x A sample dataframe is

Re: [R] Looking up the code for a function

2015-05-06 Thread Boris Steipe
Here's a discussion on stack overflow with more hints ... http://stackoverflow.com/questions/19226816/how-can-i-view-the-source-code-for-a-function ... and a link to an R-News article by Uwe Ligges on the topic http://cran.r-project.org/doc/Rnews/Rnews_2006-4.pdf (p. 43 f) Cheers, Boris On

Re: [R] lm model exported from R to excel

2015-05-06 Thread John Kane
And for those of us who know close to nothing about HTML I found just now that under a basic print.xtable commmand we get those horrible HMTL borders that in Apache OpenOffice seemed impossible to remove safely. No idea about Word--I have not used it in years. I did find that adding

[R] Looking up the code for a function

2015-05-06 Thread Ronald Kölpin
Hi all, I am trying to find out how a certain functionality is implemented in R respectively what a certain found does exactly. Specifically I am interested in multivariate kernel density estimation. I found the ks package and its kde function. Usually, my preferred way to look under the hood of

Re: [R] Looking up the code for a function

2015-05-06 Thread Viechtbauer Wolfgang (STAT)
Probably these are non-exported functions. Try: getAnywhere(function name) Or if you know which package a function comes from: package name:::function name Best, Wolfgang -- Wolfgang Viechtbauer, Ph.D., Statistician Department of Psychiatry and Neuropsychology School for Mental

[R] nlminb supplying NaN parameters to objective function

2015-05-06 Thread Jean Marchal
Dear list, I am doing some maximum likelihood estimation using nlminb() with box-constraints to ensure that all parameters are positive. However, nlminb() is behaving strangely and seems to supply NaN as parameters to my objective function (confirmed using browser()) and output the following:

[R] Not able to submit work assignment4 with submitscript3.R

2015-05-06 Thread Sonia Marin
Hi, I tried to submit the work assignment4 with submitscript3.R and i got an error message: Error in assign(.CourseraLogin, r, globalenv()) : unused arguments (r, globalenv()) I tryied to do it manually, but the files that I got to upload was empty. Please, let me know, how can i do to send the

[R] How to finding a given length of runs in a series of data?

2015-05-06 Thread jcrosbie
I'm trying to study times in which flow was operating at a given level or greater. To do so I have created a way to see how long the series has operated at a high level. But for some reason the data is calculating the runs one hour to long. Any ideas on why? Code:

Re: [R-es] Muestreo de bases de datos

2015-05-06 Thread Freddy Omar López Quintero
Gracias a todos por sus respuestas. Han enriquecido mi punto de vista. Cuando deba, entonces garantizaré la representatividad de los individuos ocupando los índices o hashes en la base de datos (el problema se traslada ahora a hallar esa representatividad). Personalmente pienso que R (puro) no

Re: [R-es] Resumen de R-help-es, Vol 75, Envío 7

2015-05-06 Thread Pedro Concejero Cerezo
Hola, me sorprende leer tu opini�n (R (puro) no es la herramienta ideal para el manejo directo del 'big data') cuando precisamente este pasado mes de abril SparkR (ver descripci�n de su web m�s abajo) se ha integrado en Apache Spark y todo el mundo que est� en ese ajo del big data (buzzword

Re: [R-es] Resumen de R-help-es, Vol 75, Envío 7

2015-05-06 Thread Pedro Concejero Cerezo
Vaya, polémica. ¿R puro es R base? Porque van ya por 6618 paquetes en CRAN http://cran.r-project.org/web/packages/index.html Y nadie sabe bien cuántos hay en github. Por cierto, ¿alguno conoce un código para hacer una estimación? El 06/05/2015 a las 16:09, Freddy Omar López Quintero escribió:

[R-es] El espíritu de R

2015-05-06 Thread javier.ruben.marcuzzi
Estimados Creo que no tenemos que confundirnos entre un R puro o empresas que ofrecen mejoras. El espíritu de R es ser abierto, su código es libre de modificar, hay una parte básica y luego las mejoras en forma paquetes, y es tan libre que hay superposiciones para lo mismo, código más y

Re: [R-es] Resumen de R-help-es, Vol 75, Envío 7

2015-05-06 Thread Fernando Fernández
Esa sería otra discusión, lo que yo entiendo por R puro incluiría todo aquel paquete que no necesita recursos externos para funcionar (un cluster spark, hadoop, una bbdd mysql, Oracle, Python...). Cualquier cosa que me pueda bajar con install.packages y funcione sin hacer nada más, simplificando