[R] Help sought with 1. converting factor to numeric; 2. creating new dataframe

2014-12-16 Thread Aditya Singh via R-help
Dear R-experts, I am relatively new to R. Please help me in converting a dataframe into a numeric and then creating a new dataframe. R-code attached: my_xtrain=read.table(./train/X_train.txt) my_xtest=read.table(./test/X_test.txt) my_merge_data=merge(my_xtrain,my_xtest,all=TRUE) ###

Re: [R] Help sought with 1. converting factor to numeric; 2. creating new dataframe

2014-12-16 Thread Michael Dewey
Comments in line On 16/12/2014 11:25, Aditya Singh via R-help wrote: Dear R-experts, I am relatively new to R. Please help me in converting a dataframe into a numeric and then creating a new dataframe. R-code attached: my_xtrain=read.table(./train/X_train.txt)

[R] Network graph google maps‏

2014-12-16 Thread Tim de Wolf
Hello everybody. I am not sure if I am in the right forum for my question. If so, please let me know so I can go somewhere else! Thanks. Currently I am trying to familiarize myself with R. I am trying to plot some sort of Network graph (think of migration maps). Basically, I'd like to have an

[R] - PLS-Package - PLSR loadings

2014-12-16 Thread Wolfgang Obermeier
Dear Subscribers, how is it possible that the loadings of the second or even third component of a PLS-Analysis show higher values than the first component? Somebody got an idea?? Thanks in advance, Wolfgang -- Dipl. Geogr. Wolfgang Obermeier Faculty of Geography Philipps-University of

[R] issues with corner.label() from plotrix

2014-12-16 Thread Brandstätter Christian
Dear Mr. Jim Lemon, I tried to contact you via e-mail, but apparently it didn't work. I enjoy using the function corner.label() a lot, since I tend to use multiplots. However, recently I discovered two issues: firstly, the parameter cex doesn't work; for this I was able to produce a simple

[R] The R Foundation - New board

2014-12-16 Thread Martin Maechler
Dear R lovers and other useRs, notably benefactors, donors, supporting members and institutions of the R foundation http://www.r-project.org/foundation/ About 11.7 years ago, in April 2003, the R Foundation was announced by Fritz Leisch,

[R] bad label change in step() from lmerTest package

2014-12-16 Thread Bastien.Ferland-Raymond
Hello list, I recently started working with the step() function in the lmerTest package and I notice a weird behavior that may be a bug. The package perform stepwise selection of fixed and random effects, however when it discard the random variable because not significant, it changes the

[R] Help specifying a non-linear model in nlsLM()

2014-12-16 Thread Chandrasekhar Rudrappa
Dear All, I am trying to fit the following model in nlsLM(): fn5 - function(x, T, t1, w_inf, Lt0){ S-function(x, T, t1){ x+(1-T)/(2*pi)*sin(2*pi*(x-t1)/(1-T)) } F - function(x, T, t1){ t2 - t1 + (1-T)/2 t3 - t1 + (1+T)/2 t.factorial - x%%1 floor(x)*(1-T) + S(t.factorial, T, t1)*(0=t.factorial

Re: [R] Help specifying a non-linear model in nlsLM()

2014-12-16 Thread Bert Gunter
Suitable help may not be possible. I suspect that either your function/code is funky (is the function smooth, non-infinite near your starting value?) or you are overparameterized. If the latter, the remedy may depend on the nature of your data, which you have not shared. While you may receive

Re: [R] circlize package: different font size for axis labels

2014-12-16 Thread Fix Ace
I was trying to ask if there is way to change the color of the axis... Thanks! On Monday, December 15, 2014 1:39 PM, Gu, Zuguang z...@dkfz-heidelberg.de wrote: Hi, In current version, `labels.font` in `circos.axis` can only be a scalar ( a vector with length one). But you can first

Re: [R] circlize package: different font size for axis labels

2014-12-16 Thread Fix Ace
Hi, Dr. Gu, Thank you very much for the answer. This trick works.  Another question, is there a way to change the color or the axis? Thanks! On Monday, December 15, 2014 1:39 PM, Gu, Zuguang z...@dkfz-heidelberg.de wrote: Hi, In current version, `labels.font` in `circos.axis` can

[R] GenMatch providing different results

2014-12-16 Thread Rob Wood
Hi there, I'm performing some propensity score matching in R, where I am using GenMatch() to generate a weight matrix for the covariates, before plugging that into Match(). However, I keep on getting different results each time I run the code. I'm using int.seed and unif.seed in GenMatch, but to

[R] Extract values from multiple lists

2014-12-16 Thread SH
Dear List, I hope this posting is not redundant. I have several list outputs with the same components. I ran a function with three different scenarios below (e.g., scen1, scen2, and scen3,...,scenN). I would like to extract the same components and group them as a data frame. For example,

Re: [R] Extract values from multiple lists

2014-12-16 Thread David L Carlson
Something like scens - paste0(scen, 1:N) new.df - data.frame(sapply(scens, function(x) get(x)[[pop.inf.r]])) - David L Carlson Department of Anthropology Texas AM University College Station, TX 77840-4352 -Original Message- From: R-help

Re: [R] Extract values from multiple lists

2014-12-16 Thread Dénes Tóth
On 12/16/2014 06:06 PM, SH wrote: Dear List, I hope this posting is not redundant. I have several list outputs with the same components. I ran a function with three different scenarios below (e.g., scen1, scen2, and scen3,...,scenN). I would like to extract the same components and group

Re: [R] Extract values from multiple lists

2014-12-16 Thread Jeff Newmiller
You are chasing ghosts of performance past, Denes. The data.frame function causes no problems, and if it is used then the OP would not need to presume they know the internal structure of the data frame. See below. (I am using R3.1.2.) a1 - list(x = rnorm(1e6), y = rnorm(1e6)) a2 - list(x =

[R] Forecast with data Georeferenced

2014-12-16 Thread Darwin Padilla
Dear R. My name is Darwin, I'm currently doing my thesis and I want to develop a package to help me predict georeferenced data, ie whether there is any pattern or behavior to know if it will happen again the same event again, I might say statistical technique helps to accomplish what I need or

[R] Stop R from changing matrix to numeric

2014-12-16 Thread Sachinthaka Abeywardana
I have the following cost function: cost-function(x){ x[,1]*sin(4*x[,1])+1.1*x[,2]*sin(2*x[,2]) } If I send in a matrix which has MORE than one row and 2 columns, this works fine. However, if I try to do cost(t(as.matrix(c(1,1 it gives me an index error. When I tried debugging it, I found

Re: [R] Stop R from changing matrix to numeric

2014-12-16 Thread PIKAL Petr
Hi I can not reproduce your error cost-function(x){ + x[,1]*sin(4*x[,1])+1.1*x[,2]*sin(2*x[,2]) + } cost(t(as.matrix(c(1,1 [1] 0.2434247 Cheers Petr -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Sachinthaka Abeywardana Sent: