[R] Error in twitterR package

2016-06-14 Thread Seema Shelke via R-help
Hi, I am trying to use twitter package. I got  below error while authentication. > setup_twitter_oauth(api_key,api_secret,access_token, access_token_secret) [1] "Using direct authentication" Error in check_twitter_oauth() : OAuth authentication error: This most likely means that you have

[R] help with r package "trip"

2016-06-14 Thread Alice Domalik
Hi List, I'm relatively new to R, so apologies if my question is rather elementary. I'm working with some bird tracking data and I would like to calculate the maximum distance traveled from the colony. For the maximum distance traveled, I was going to use the function homedist(). However,

Re: [R] processing time too long

2016-06-14 Thread Jim Lemon
I'm still unsure of what you are attempting to do with this data. First, it is very sparse, appearing to be the counts of occurrences of 2567 strings, some of which are recognizable English words. I suspect that you are trying to get something very simple like the frequency of these strings within

Re: [R] processing time too long

2016-06-14 Thread Jim Lemon
Hi Sashi, Since I do not want to create a large fake data set and then painstakingly test and debug your code, why not try your code with a subset of the data, maybe only 400 rows. If that runs slowly, your code is very inefficient (it looks as though it is). You can then begin to identify where

Re: [R] strange error message when using rnorm and rbinom

2016-06-14 Thread Jim Lemon
Hi JI, The most likely problems are negative numbers for sd or "k" being larger than the number of mu.m2 or disp.m2 values. Jim On Wed, Jun 15, 2016 at 4:06 AM, JI Cho wrote: > Dear R users, > > I have been using rnorm, rbinom and have been getting the following warning >

Re: [R] Installation of package "rio" broken

2016-06-14 Thread Uwe Ligges
On 14.06.2016 21:01, Ista Zahn wrote: On Tue, Jun 14, 2016 at 3:19 PM, wrote: Hi all, today I wanted to install package "rio". As it depends on package "feather" which is only available as source I have chosen to install "rio" from source. The installations fails with

Re: [R] strange error message when using rnorm and rbinom

2016-06-14 Thread Bert Gunter
Do not believe everything you read on the internet! "In one of the resources I found in over the internet explains that the mean and sd should be declared as integers." That is compete crap. The mean of a norma/Gaussian can be any real; the sd can be any positive real. Moreover, one does not

Re: [R] strange error message when using rnorm and rbinom

2016-06-14 Thread Tom Wright
As you probably already guessed we are going to need to see the contents of nref, mu.m2 and disp.m2 to help. dput(nref) dput(mu.m2) dput(disp.m2) k might help too. On Tue, Jun 14, 2016 at 2:06 PM, JI Cho wrote: > Dear R users, > > I have been using rnorm, rbinom and have been

[R] strange error message when using rnorm and rbinom

2016-06-14 Thread JI Cho
Dear R users, I have been using rnorm, rbinom and have been getting the following warning message when I do not have any NAs in my generated values. Warning messages:1: In rnorm(nref, mean = mu.m2[[k]], sd = sqrt(disp.m2[[k]])) : NAs produced In one of the resources I found in over the

Re: [R] Installation of package "rio" broken

2016-06-14 Thread Ista Zahn
On Tue, Jun 14, 2016 at 3:19 PM, wrote: > Hi all, > > today I wanted to install package "rio". As it depends on package "feather" > which is only available as source I have chosen to install "rio" from source. > The installations fails with the following messages: "feather"

Re: [R] Closing FTP sessions with RCurl

2016-06-14 Thread Tom Wright
No expert here, and this isn't tested. It seems you can set the forbid.reuse option which will cause curl to shutdown the connection after transfer is complete. if(url.exists("http://www.omegahat.net/RCurl/index.html;)) { curl <- getCurlHandle()

Re: [R] Installation of package "rio" broken

2016-06-14 Thread William Dunlap via R-help
Your log showed that g++ was given the flag -std=c++0x. It should be -std=c++11 so the 'using typename = blahblah' syntax works. Either your feather/src/Makevars is missing the line CXX_STD=CXX11 or your version of R is lacking support for CXX_STD. > g++ -m32 -std=c++0x

[R] Installation of package "rio" broken

2016-06-14 Thread G . Maubach
Hi all, today I wanted to install package "rio". As it depends on package "feather" which is only available as source I have chosen to install "rio" from source. The installations fails with the following messages: -- cut -- * installing *source* package 'feather' ... ** Paket 'feather'

[R] Closing FTP sessions with RCurl

2016-06-14 Thread J Payne
Does anyone know how to close an FTP session with RCurl?  I am trying to automate the process of downloading snow data from a government website, and their server is throttling the connection after a few files are downloaded.  I contacted their system administrator, who wrote: “My suspicion at

Re: [R] Haplo.glm error: Failed to converge during EM-glm loop

2016-06-14 Thread Ravi Varadhan
It is a "warning" message, but not an "error" message. Therefore, you should still get parameter estimates. However, lack of convergence is often an important issue. Although in the case of the EM algorithm, it may not be so serious since EM is notoriously slow to converge when you set a

[R] is there a package in R or functions to calculate odds/hasard ratio from spline regression

2016-06-14 Thread takiy berrandou
Hello, I'm looking for a package or function, which calculate OR/HR from spline model regression. for example in SAS it exist some MACRO helping to do that easiely. i had make some research on the forum here and on the web but without any succes. thanks for the answers. Takiy -- Takiy

Re: [R] two difficult loop

2016-06-14 Thread greg holly
Thanks a lot Jim. I am struggling to solve the problem.I do appreciate for your helps and advice. Greg On Tue, Jun 14, 2016 at 3:39 AM, Jim Lemon wrote: > Hi Greg, > This is obviously a problem with the data. The first error indicates > that the sequence of integers

Re: [R-es] Ayuda con la homocedasticidad de Varianza

2016-06-14 Thread José Trujillo Carmona
El 14/06/16 a las 15:58, mora...@us.es escribió: Hola, puedes calcular las cuasivarianzas muestrales por columnas mediante tapply y luego compararlas. El cociente entre las dos varianzas sigue una distribución F de Snedecor con grados de libertad n1-1 y n2-2. Puedes calcular la probabilidad de

Re: [R] rlnorm behaviour

2016-06-14 Thread Thierry Onkelinx
You need to study my examples and the helpfile of ifelse more carefully. Then you'll understand why your code is wrong. ​ ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance

Re: [R] detecting if a variable has changed

2016-06-14 Thread S Ellison
> > Nope, Ted. I asked for a O(log(n)) solution, not an O(n) one. > > I don't think that's possible with a numeric vector. Inserting an entry > at a random location is an O(n) operation, since you need to move all > following values out of the way. If the vector is presorted, wouldn't a binary

Re: [R] rlnorm behaviour

2016-06-14 Thread Ayyappa Chaturvedula
I am sorry, I missed that. I think I made it more appropriate and not using unnecessary simulated values. Thank you for your help. fulldata$Wt<-ifelse(fulldata$Sex==1,rlnorm(length(fulldata$Sex[fulldata$Sex==1]), meanlog = log(85.1), sdlog = sqrt(0.0329)),

Re: [R] rlnorm behaviour

2016-06-14 Thread Thierry Onkelinx
Please keep r-help in cc. Yes. Have a look at this example ifelse( sample(c(TRUE, FALSE), size = 0.5 * length(letters), replace = TRUE), letters, LETTERS ) ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie &

[R] Factor levels in training set

2016-06-14 Thread ch.elahe via R-help
Hi all, I want to use Supervised Self organizing Maps from Kohonen package for my data. I need to divide my df into training set and test set, but a part of my df contains column with factor levels and I don't know how to bring them into my training set. Currently I use the following command

[R] Factor levels in training set

2016-06-14 Thread ch.elahe via R-help
Hi all, I want to use Supervised Self organizing Maps from Kohonen package for my data. I need to divide my df into training set and test set, but a part of my df contains column with factor levels and I don't know how to bring them into my training set. Currently I use the following command

Re: [R] rlnorm behaviour

2016-06-14 Thread Thierry Onkelinx
Dear Ayyappa, ifelse works on a vector. See the example below. ifelse( sample(c(TRUE, FALSE), size = length(letters), replace = TRUE), letters, LETTERS ) However, note that it will recycle short vectors when they are not of equal length. ifelse( sample(c(TRUE, FALSE), size = 2 *

[R] rlnorm behaviour

2016-06-14 Thread Ayyappa Chaturvedula
Dear Group, I am trying to simulate a dataset with 200 individuals with random assignment of Sex (1,0) and Weight from lognormal distribution specific to Sex. I am intrigued by the behavior of rlnorm function to impute a value of Weight from the specified distribution. Here is the code:

Re: [R] AR1 model using ARIMA

2016-06-14 Thread Jeff Newmiller
Looks like you forgot to read the Posting Guide, too. -- Sent from my phone. Please excuse my brevity. On June 14, 2016 6:30:23 AM PDT, "T.Riedle" wrote: >Sorry, I forgot to attach the file. > > > Dear R users, >I have not received any

[R] Warning message in openxlsx

2016-06-14 Thread G . Maubach
Hi All, I get the warning message Warning message: In styles$font : partial match of 'font' to 'fonts' when executing > xls_workbook <- t_create_workbook() > xls_sheetname <- "Kunden" > xls_ds_to_save <- ds_merge1 > xls_filename <- paste0(data_created, "_Merge1_BW-SAP-Kunden_cleaned.xlsx") >

Re: [R-es] Ayuda con la homocedasticidad de Varianza

2016-06-14 Thread morales
Hola, puedes calcular las cuasivarianzas muestrales por columnas mediante tapply y luego compararlas. El cociente entre las dos varianzas sigue una distribución F de Snedecor con grados de libertad n1-1 y n2-2. Puedes calcular la probabilidad de aceptar H0 con la función pf. El 14/06/2016 12:00,

[R] AR1 model using ARIMA

2016-06-14 Thread T.Riedle
Sorry, I forgot to attach the file. Dear R users, I have not received any help regarding my problem. The rolling window AR1 model returns an error if I run my code as follows: data<-GSDAF[,2] rollingarma<-rollapply(data,width=36,function(data)

Re: [R] summing up a column.

2016-06-14 Thread oslo via R-help
Jeff; Thanks a lot. I do appreciate for this. I will try your codes. Regards, Oslo On Monday, June 13, 2016 11:47 PM, Jeff Newmiller wrote: You did half of what Petr asked... but your email still looks unreadable because you did not send it as text only. Look

Re: [R] AR1 model using ARIMA

2016-06-14 Thread Duncan Murdoch
On 14/06/2016 7:46 AM, T.Riedle wrote: Dear R users, I have not received any help regarding my problem. Please read the posting guide (see the link at the bottom of every message). If you don't post reproducible code, it's much harder to help you. Duncan Murdoch The rolling window AR1

Re: [R-es] Ejecutar bloques con codigo

2016-06-14 Thread eric
Muchas gracias emilio, Saludos, eric. On 06/12/2016 11:24 PM, Emilio L. Cano wrote: Eric, Puedes hacer source sobre ficheros generados "al vuelo" desde tu propio script, combinando readLines, writeLines y grep (esto último para filtrar los bloques, pero la dificultad de esto ya depende de

[R] AR1 model using ARIMA

2016-06-14 Thread T.Riedle
Dear R users, I have not received any help regarding my problem. The rolling window AR1 model returns an error if I run my code as follows: rollingarma<-rollapply(data,width=36,function(data) coef(arima(data,order=c(1,0,0 Error in arima(data, order = c(1, 0, 0)) : non-stationary AR part

Re: [R-es] Ayuda con la homocedasticidad de Varianza

2016-06-14 Thread José Trujillo Carmona
No entiendo el problema. ¿La cuestión es saber si las distintas variables tienen la misma varianza? No es razonables esperar que la Temperatura, la concentración o la profundidad tengan la misma varianza. La varianza tienen unidades y la varianza depende de la unidad de medida. Y no es

Re: [R] two difficult loop

2016-06-14 Thread Jim Lemon
Hi Greg, This is obviously a problem with the data. The first error indicates that the sequence of integers regrange[1]:regrange[2] is too long to be allocated. Most likely this is because one or both of the endpoints are infinite. Maybe if you can find where the NAs are you can fix it. Jim On