[R] switch parameter in MSwM package

2017-03-23 Thread Ashim Kapoor
Dear All, I am currently trying to use the Markov Switching Models(MSwM) package in R.I am not sure as to how to use the switch parameter. From what I understand, switch is a boolean vector which says what parameters are regime dependent. My confusion is that what is the order of the parameters

Re: [R] How to change parameter values as a function to time with the package "deSolve"

2017-03-23 Thread David Winsemius
> On Mar 23, 2017, at 2:59 PM, Marine Regis wrote: > > Hello, > > I am trying to solve an ODE in R using deSolve. With the following code, I > expected the parameter �gamma0� takes the values 5 at time step 0, 1, 2, 3, > 4, 5, 6, 7, 8, 9 and 10, and 0 otherwise.

Re: [R] Modeling Time Series with Missing Observations

2017-03-23 Thread David Winsemius
There's also an irts-package "irregular time series" Sent from my iPhone > On Mar 23, 2017, at 3:42 PM, John C Frain wrote: > > Google "arima missing data r" will bring up several references including >

Re: [R] Modeling Time Series with Missing Observations

2017-03-23 Thread John C Frain
Google "arima missing data r" will bring up several references including http://stats.stackexchange.com/questions/104565/how-to-use-auto-arima-to-impute-missing-values. There are several other useful results in that search. John C Frain 3 Aranleigh Park Rathfarnham Dublin 14 Ireland

[R] How to change parameter values as a function to time with the package "deSolve"

2017-03-23 Thread Marine Regis
Hello, I am trying to solve an ODE in R using deSolve. With the following code, I expected the parameter �gamma0� takes the values 5 at time step 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10, and 0 otherwise. However, the print(gamma0) shows that �gamma0� stays at 0. Here is my ODE: param <- c(a =

Re: [R] (no subject)

2017-03-23 Thread Jim Lemon
Hi Munevver, Go here: https://stat.ethz.ch/mailman/listinfo/r-help which is probably where you subscribed, and UNSUBSCRIBE Jim On Fri, Mar 24, 2017 at 3:55 AM, munevver kaya wrote: > Dear Sir/Madam, > I do not want to receive any email by r-help. Can you delete me

Re: [R] r question

2017-03-23 Thread Rui Barradas
Hello, Please keep this on the list. I'm cc-ing r-help and so should you always. I got no error, just warning messages. After a long output I got the following. NOTE: HARD MAXIMUM GENERATION LIMIT HIT Solution Fitness Value: -2.592094e+03 Parameters at the Solution (parameter, gradient):

Re: [R] correct subset in R

2017-03-23 Thread David Winsemius
> On Mar 23, 2017, at 11:28 AM, Rui Barradas wrote: > > Hello, > > I would try ?merge, in particular see the arguments by.x and by.y > > Hope this helps, > > Rui Barradas > > Em 23-03-2017 18:19, Elahe chalabi via R-help escreveu: >> Hi all, >> I found an answer to the

Re: [R] correct subset in R

2017-03-23 Thread Rui Barradas
Hello, I would try ?merge, in particular see the arguments by.x and by.y Hope this helps, Rui Barradas Em 23-03-2017 18:19, Elahe chalabi via R-help escreveu: Hi all, I found an answer to the last question I asked in this group and now I want to have a correct subset of my data: I have a

[R] correct subset in R

2017-03-23 Thread Elahe chalabi via R-help
Hi all, I found an answer to the last question I asked in this group and now I want to have a correct subset of my data: I have a following df1 which is list of all cities in US and their states: $ name : Factor w/ 1008 levels "Ackley","Ackworth",..: 1 2 3 $ state: Factor w/ 1

Re: [R] (no subject)

2017-03-23 Thread Peter Dalgaard
The recipe for unsubscribing is in the footer of every r-help message. General readers of the list can not do it for you. -pd > On 23 Mar 2017, at 17:55 , munevver kaya wrote: > > Dear Sir/Madam, > I do not want to receive any email by r-help. Can you delete me in

[R-es] Fwd: Re: ayuda

2017-03-23 Thread José Trujillo Carmona
Mensaje reenviado Asunto: Re: [R-es] ayuda Fecha: Thu, 23 Mar 2017 17:01:35 +0100 De: Jos� Trujillo Carmona Para: jbetanco...@iscmc.cmw.sld.cu Mi soluci�n: Dataset <- read.table("predicted values.txt", header=FALSE, sep="",

[R] (no subject)

2017-03-23 Thread munevver kaya
Dear Sir/Madam, I do not want to receive any email by r-help. Can you delete me in your mail list? Thank you. Sincerely, Munevver Basman [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

Re: [R] "Ordiellipse" in vegan package plot; how to plot sd for individual species

2017-03-23 Thread David L Carlson
Most attachments (including your data and graph) get stripped from mail sent to the list. If the data are a plain text file, giving the file an extension of .txt will usually let it survive the trip (even if it is a .csv file). Graphics will survive if they are .png files. If the datasets are

Re: [R] argument to 'which' is not logical

2017-03-23 Thread S Ellison
> I'm trying to run the code: inds<-which(c != 0 ), but it gave me error: Error > in > base::which(x, arr.ind, useNames, ...) :   argument to 'which' is not logical Your coefficients are not a numeric vector. You'll have to sort that out by extracting or testing the individual values. A look at

Re: [R] string pattern matching

2017-03-23 Thread Joe Ceradini
Oh, I see the utility of that now. Definitely will be using "term.labels" (which I was not aware of). Thanks! On Thu, Mar 23, 2017 at 9:48 AM, William Dunlap wrote: > If you are trying to see if one model nested in another then I think > looking at the 'term.labels' attribute

Re: [R] string pattern matching

2017-03-23 Thread William Dunlap via R-help
If you are trying to see if one model nested in another then I think looking at the 'term.labels' attribute of terms(formula) is the way to go. Most formula-based modelling functions store the output of terms(formula) in their output and many supply a method for the terms function that extracts

Re: [R] Modeling Time Series with Missing Observations

2017-03-23 Thread Jeff Newmiller
Even the most basic introduction to R discusses the use of NA for missing data. Injecting values that could be mistaken for actual readings is a dangerous approach. You can use the merge function to introduce missing rows into zoo objects or data frames. -- Sent from my phone. Please excuse

[R] Modeling Time Series with Missing Observations

2017-03-23 Thread Paul Bernal
Dear all, Hope you are doing well. I am trying to model the historical number of transits of a particular market segment, but the problem is that I have missing data. I am working with monthly data, so I have 12 observations per year (in general). The problem is that, when I bring the data from

[R] Can fallback font be specified?

2017-03-23 Thread Jinsong Zhao
Hi there, I am a Chinese R user. I hope to plot the following code with Chinese in one font family, such as SimHei, but English in another font family, such as Times New Roman. plot(1:10, type = "n", xlab = "Hello \u4F60\u597D", family = "serif") In my case, the system default font is

[R] "Ordiellipse" in vegan package plot; how to plot sd for individual species

2017-03-23 Thread Larsson Emil
Hi R-Help, I have been looking for an answer to this question for some time without success, so now my hope is that you will distribute it to your email subscribers, or direct me to another forum where this question is not off-topic. I have a dataset with 224 rows (=sites), ca 20

Re: [R-es] ayuda

2017-03-23 Thread Víctor Granda García
Hola! Como te dice Isidro, es con la opción row.names = FALSE: *write.csv(objeto, 'nombre_archivo.csv', row.names = FALSE)* También puedes usar el paquete readr (el que usa por defecto RStudio al cargar desde la IDE) con la orden write_csv (nota que la diferencia es un guión bajo en vez de un

Re: [R] Extracting time-series data from netCDF file for a defined period using ncdf4 package

2017-03-23 Thread Ben Tupper
Hi, You problem as stated certainly is puzzling since you have one NCDF file but 'time units are different'. I don't know what to make of that. If you had a simpler case where data are dimensioned as [x,y,t] then you can convert dates to index use in ncdf4::ncvar_get() I would start with a

Re: [R] string pattern matching

2017-03-23 Thread Joe Ceradini
Thanks for the additional response, Bill. I did not want to bog down the question with the full context of the function. Briefly, given a set of nested and non-nested regression models, I want to compare AIC (bigger model - smaller model) and do an LRT for all the nested models that differ by a

Re: [R-es] ayuda

2017-03-23 Thread javier.ruben.marcuzzi
Estimados ¿Los datos están en una lista o en un data.frame? Yo a eso lo supe hacer pero desde un data.frame a csv, lógicamente hay mucho gusto personal, técnicamente no debería haber inconvenientes. Javier Rubén Marcuzzi De: Isidro Hidalgo Arellano Enviado: jueves, 23 de marzo de 2017 10:19

Re: [R-es] Alternativa a RStudio

2017-03-23 Thread Griera-yandex
On Wed, 22 Mar 2017 00:35:18 -0300 eric wrote: > Hola Javier, yo uso rkward en Debian y funciona Yo también es lo que utilizo también en Debian. > fantastico para mis > necesidades, hay una version para windows en su pagina > >

Re: [R-es] ayuda

2017-03-23 Thread Isidro Hidalgo Arellano
Si no recuerdo mal, la función "write.csv" con la opción "row.names = FALSE"... Un saludo Isidro Hidalgo Arellano Observatorio del Mercado de Trabajo Consejería de Economía, Empresas y Empleo http://www.castillalamancha.es/ -Mensaje original- De: R-help-es

[R-es] ayuda

2017-03-23 Thread jbetancourt
Etimados Necesito llevar estos valores a un csv, pero exclyendo los numeros de orden que aparecen (como ejemplo 1 2 3 4 5 6 7... 146 147 148 149 ) ?cual es el procedimiento en R? saludos José adjunto el archivo 1 2

Re: [R-es] Alternativa a RStudio

2017-03-23 Thread Paco Molinero
Hola, estoy en el Colegio oficial de psicologia de Catalu�a en la Delegaci�n de Girona, desde la Junta nos gustar�a ofrecer a los colegiados alg�n curso corto de las cosas b�sicas de R que han de conocer para utilizar en estadistica aplicada a diferentes �mbitos de la pr�ctica profesional.

Re: [R-es] Alternativa a RStudio

2017-03-23 Thread Fernando Macedo
Buenas Fernando, podrías recomendar alguna lectura/tutorial/web para alguien que siempre escucho hablar de las bondades del emacs pero nunca lo usó? Como para iniciantes. Gracias, saludos! Fernando Macedo El 21/03/17 a las 21:31, Fernando Arce via R-help-es escribió: Buenos dias, que tal?

Re: [R] Error in leaps.

2017-03-23 Thread John Kane via R-help
Hi Cindy,Welcome to R-help. Have  a look at the posting guidelines and their suggestion about a minimal example. What we  need to help you is some sample data and a "minimal" amount of code that illustrates your problem. Someone may be able to guess the problem from your errror message but I'd

Re: [R] R package

2017-03-23 Thread Ulrik Stervbo
Hi Elahe, maybe the us.cities() in the maps package is what you look for. HTH Ulrik On Thu, 23 Mar 2017 at 11:34 Elahe chalabi via R-help wrote: > Hi all, > > I have a data frame containing serial numbers for US. I also have a column > showing the city in US, now my

[R] Error in leaps.

2017-03-23 Thread Cindy Wang
Dear All, I am trying to use the model, Program Evaluation in order to determine the economic impact of a policy change. While trying to run my own data on RStudio, using the codes from the paper "An R Package for the Panel Approach Method for Program Evaluation: Pampe" by Ainhoa Vega-Bayo, I

[R] R package

2017-03-23 Thread Elahe chalabi via R-help
Hi all, I have a data frame containing serial numbers for US. I also have a column showing the city in US, now my question is is there a package in R able to get the city in US as input and then return the name of State for that city?! Thanks for any help! Elahe

[R] Extracting time-series data from netCDF file for a defined period using ncdf4 package

2017-03-23 Thread കുഞ്ഞായി kunjaai
Dear All, I am trying to extract a time series from a netCDF file. I want to extract data for the time period 1971-1 to 1990-12-31 only. time axis units is 'days since 1850-1-1' For one or two files I can use "count" argument, but I have more than 100 such files and its time units are