[R] simulation of censoring data

2010-02-23 Thread Samuel Okoye
Dear all, I would like to understand the effect of censoring in a linear model therefore I am doing the following    n - 20  cen - sample(x=c(0,1), size=n-1, replace=TRUE, prob=c(0.8,0.2))  cen - c(cen,0)  x - rnorm(n,0,1)  tt - -1+x+log(-log(1-runif(n)))+0.5767  y - c()  for(i in 1:n){     y[i]

Re: [R] env() for lme4

2010-02-23 Thread Dieter Menne
-- View this message in context: http://n4.nabble.com/env-for-lme4-tp1565045p1565603.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] env() for lme4

2010-02-23 Thread Dieter Menne
Marianne Promberger-3 wrote: Yes, I believe you need library(lme4a), the development version of lme4. (But then something didn't work with profile() on my particular model but I forgot what it was -- haven't had time to pursue this yet) profile() worked for me (=output looked

[R] Longitudinal analysis: contrasting time points

2010-02-23 Thread Denis . Aydin
Hi everyone I have the following situation: In a longitudinal study, subjects fill out a questionnaire every year (repeated measurements over time). Also, the subjects are nested within departments. There is an intervention going on over time. The outcome variable is continuous. Now I'd like

Re: [R] how to delete a parameter from list after running negative binomial error

2010-02-23 Thread Gavin Simpson
On Sun, 2010-02-14 at 21:39 +, Michelle Waterman wrote: snip / I was thinking doing something like this: model2.glm.nb2 -update(model1.glm.nb, ~ . -rain, -temp, data=climate.dat) summary(model2.glm.nb2) Leave out the , between your terms: model2.glm.nb2 - update(model1.glm.nb, ~ . -

Re: [R] GAM for non-integer proportions

2010-02-23 Thread Gavin Simpson
On Mon, 2010-02-15 at 01:33 -0500, Julian Burgos wrote: Dear list, Im using the mgcv package to model the proportion by weight of certain prey on the stomach content of a predator. This proportion is the ratio of two weights (prey weight over stomach weight), and ranges between 0 and 1.

[R] Where can I find general help on statistics?

2010-02-23 Thread Mario Valle
Could you suggest where I could post general statistical/data analysis questions? For now I have found: http://talkstats.com/ and http://www.statisticsforums.com/ Thanks! mario -- Ing. Mario Valle Data Analysis and Visualization Group| http://www.cscs.ch/~mvalle Swiss

Re: [R] generating reports from database through R

2010-02-23 Thread Paul Hiemstra
durga chennu wrote: Hi, after some research now i am connecting to the database .but i am not getting any reports can u please tell me any suggestions or ideas. Regards chinna. [[alternative HTML version deleted]] __

[R] export graphics for editing in Illustrator

2010-02-23 Thread Ivan Calandra
Dear R users, I would like to edit my graphics in Illustrator. I know that I can set up almost every graph parameter in R, but the time I will spend searching for the correct settings might not be worth since I'm quite used to Illustrator and since I will in any case use Illustrator to

[R] export tables to Excel files

2010-02-23 Thread Ivan Calandra
Dear R users, I've just posted a similar question about Illustrator. This time I would like to export the results of my statistic tables and my dataframes into Excel files. Up to now I've used write.csv(), but I have to resave every file in .xls in Excel. I would like to know if there is a

Re: [R] svm

2010-02-23 Thread Amy Hessen
Hi Steve, Thank you so much for your reply. I’m attaching the dataset and this is my code: library(e1071) mydata - as.matrix(read.delim(iris.txt)) train.x - mydata[,-1] train.y - mydata[,1] mymodel - svm(train.x, train.y, cross=3, type=C-classification) Could you please try it and try it

Re: [R] Use of R in clinical trials

2010-02-23 Thread Emmanuel Charpentier
Le samedi 20 février 2010 à 09:44 -0800, Dieter Menne a écrit : If you check http://n4.nabble.com/R-help-f789696.html you will note that this thread has the largest number of read since years. Looks like an encouragement to Mark to keep the mentioned CRAN document updated. To add a

Re: [R] export tables to Excel files

2010-02-23 Thread Gabor Grothendieck
See R wiki for discussion of various packages that interface R and Excel: http://rwiki.sciviews.org/doku.php?id=tips:data-io:ms_windows On Tue, Feb 23, 2010 at 4:35 AM, Ivan Calandra ivan.calan...@uni-hamburg.de wrote: Dear R users, I've just posted a similar question about Illustrator. This

Re: [R] Longitudinal analysis: contrasting time points

2010-02-23 Thread ONKELINX, Thierry
Dear Denis, Have a look at the lme() and nlme() functions, both in the nlme package. You find more details in Pinheiro Bates (2000). A linear trend over time: lme(Y ~ Year, random = ~1|Department/Person) Contrasts between years: lme(Y ~ factor(Year), random = ~1|Department/Person) You might

[R] Odp: export tables to Excel files

2010-02-23 Thread Petr PIKAL
Hi I use this simple statement to produce output readable directly to excel write.excel function (tab, ...) write.table(tab, clipboard, sep = \t, row.names = F) If you put a name of a file instead of clipboard then you can use output to file and you can use append =TRUE See ?write.table

Re: [R] Use of R in clinical trials

2010-02-23 Thread Dieter Menne
http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/GuidanceDocuments/ucm071072.htm http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/GuidanceDocuments/ucm071072.htm Tho only software products explicitely mentioned in this documents are ... WinBUGS, BRugs and

Re: [R] function on all pairs of vector entries

2010-02-23 Thread Dimitris Rizopoulos
try this: a - c(0.5343909, -0.7784353, -0.0568370, 1.8772838, -1.3183407, 0.8227418) mean - c(0, 0) Sigma - matrix(c(1, 0, 0, 1), 2, 2) library(mvtnorm) ind - combn(length(a), 2) x - cbind(a[ind[1, ]], a[ind[2, ]]) dmvnorm(x, mean, Sigma) I hope it helps. Best, Dimitris On 2/23/2010

Re: [R] Odp: export tables to Excel files

2010-02-23 Thread Tal Galili
p.s: From the post I linked to earlier, I personally am using this code: # install.packages(RODBC) library(RODBC) save2excel - function(x, t.name) sqlSave(xlsFile, x, tablename = t.name, rownames = FALSE, addPK = T) xlsFile - odbcConnectExcel(C:\\output-tables.xls, readOnly = FALSE) temp.df -

Re: [R] (Somewhat) broken EPS files produced

2010-02-23 Thread Wartan Hachaturow
On Tue, Feb 23, 2010 at 4:48 AM, Marc Schwartz marc_schwa...@me.com wrote: There appears to be some issue associated with the sizing and/or scaling of the images when these are present. If I explicitly added the additional [width=0.8\textwidth] (the Sweave default) to the \includegraphics

Re: [R] Fortune candidate! Re: new to R Project

2010-02-23 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 23.02.2010 05:50:25: I have a concern with the sentiment expressed: When one is new to a language, it is often not easy to know where to start in the available documentation. It's hard to RTFM when one does not know which FM2R.

Re: [R] Odp: export tables to Excel files

2010-02-23 Thread Ivan Calandra
Thank you all for your helpful answers I will probably use the solution below, it seems more flexible. Ivan Le 2/23/2010 11:16, Tal Galili a écrit : p.s: From the post I linked to earlier, I personally am using this code: # install.packages(RODBC) library(RODBC) save2excel - function(x,

Re: [R] forecasted Results

2010-02-23 Thread Bart Joosen
How on earth can you forecast your Revenue with such a small sample??? And how do you wanna forecast, how do you want to report, which graphs do you want to make, You started out 4 threads, in each threads was asked to RTFM, provide examples, clarify, . But you still give unclear, hazy

[R] latent class factor analysis (LCFA) in R?

2010-02-23 Thread Mark Heckmann
I am looking for a package that can perform latent class factor analysis (LCFA) like in LatentGold. Does someone know wether or not it has been implemented in some package? I just can't find it. Bests, Mark ––– Mark Heckmann Dipl. Wirt.-Ing. cand. Psych.

[R] table data as input to the function

2010-02-23 Thread chinna
how to give the table data as input to the function..to do some statastical analysis -- View this message in context: http://n4.nabble.com/Generating-reports-from-database-tp1564238p1565811.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] scatterplots in car package

2010-02-23 Thread Hrishi Mittal
Robert, It seems that the scatterplot() command is starting a new graphics device. You could use the base plot command to achieve the same results including the non-parametric fit (scatterplot() uses a lowess fit): #First it's important to save the distributions as objects, otherwise rnorm()

Re: [R] axes limits in do3d

2010-02-23 Thread Hrishi Mittal
What is your dataset? Can you provide a sample? Also, what errors or warnings do you get when you run your command? - Try http://prettygraph.com Pretty Graph , the easiest way to make R-powered graphs on the web. -- View this message in context:

[R] table data as input to the function

2010-02-23 Thread chinna
how to give table data as input to the function in R projectfor doing some statistical analysis. -- View this message in context: http://n4.nabble.com/table-data-as-input-to-the-function-tp1565827p1565827.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] scatterplots in car package

2010-02-23 Thread John Fox
Dear Robert, scatterplot() uses layout() to display the scatterplot along with the marginal boxplots, and can't be used with par(mfrow); scatterplot is meant primarily for data analysis, not really for making presentation graphs. Regards, John On Tue, 23 Feb 2010 03:40:39 -0800 (PST)

[R] R Aerodynamic Package(s)?

2010-02-23 Thread Jason Rupert
By any chance is anyone aware of any R Packages that contain or expand the aerodynamic capabilities mentioned on the following website? http://www.aoe.vt.edu/~mason/Mason_f/MRsoft.html Typically I know R packages have focused on extending the statistical and graphing capability within R, so

[R] Matching Problem

2010-02-23 Thread Newbie19_02
Hi, I have a problem with function match. I might not be using it properly? I have two character vectors that contain a unique identifier: gtype_prochi - (CAO1524452 CAO0966182 CAO9209719 CAO4436178 CAO3761898 CAO3529266 CAO2427148 CAO8829776 CAO2517174 CAO5371418 CAO1535943 CAO1782827

Re: [R] table data as input to the function

2010-02-23 Thread Newbie19_02
Hi, You need to put your table into a data frame by using read.table. You can then do statistical analyses on the data frame. Natalie -- View this message in context: http://n4.nabble.com/table-data-as-input-to-the-function-tp1565827p1565842.html Sent from the R help mailing list archive at

[R] how to assess the significance of regression between a set of response and predictor variables

2010-02-23 Thread Manabu Sakamoto
Dear list, I have been using multivariate multiple regression (MMR) in the form lm(Y~X) where Y and X are matrices of response and predictor variables. I know that summary(mlm.object) would give the usual lm statistics for each response variable separately and that anova.mlm(mlm.object) will give

Re: [R] latent class factor analysis (LCFA) in R?

2010-02-23 Thread Ingmar Visser
Dear Mark, I don't know whether it has ... But there are some packages that provide functionality for specifying mixtures of user-defined distributions, in your case a factor model. package flexmix has an example of how to fit mixtures of user-defined models and so does my own package depmixS4

Re: [R] table data as input to the function

2010-02-23 Thread Hrishi Mittal
Hi chinna, Welcome to the forum and thanks for asking questions. You may not realise this but the questions you ask and the answers people provide here may help a lot of people later on. I have learnt a lot about R simply by searching the older posts on this forum. So, it is important that you

Re: [R] export graphics for editing in Illustrator

2010-02-23 Thread Paul Hiemstra
Ivan Calandra wrote: Dear R users, I would like to edit my graphics in Illustrator. I know that I can set up almost every graph parameter in R, but the time I will spend searching for the correct settings might not be worth since I'm quite used to Illustrator and since I will in any case use

Re: [R] colour highlighting inputs and outputs in the R terminal?

2010-02-23 Thread Hrishi Mittal
Liviu, if you use Emacs + ESS, that provides colour highlighting. You can also have a script file alongside so that you have a saved command history in an R source file. See http://ess.r-project.org/ to get started. - Try http://prettygraph.com Pretty Graph , the easiest way to make

Re: [R] Matching Problem

2010-02-23 Thread Newbie19_02
Dear Dennis, Thanks the a[a %n% b] function worked well for me. THanks, for the help, Natalie -- View this message in context: http://n4.nabble.com/Matching-Problem-tp1565841p1565910.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] eha aftreg performance

2010-02-23 Thread Philipp Rappold
OK - I'll see if I can spare some time on the weekend to dig a bit deeper and maybe find the issue. (Unfortunately I cannot use a phreg model because I cannot assume a proportional hazards assumption.) Göran Broström wrote: Philipp Rappold wrote: Göran, thanks for the update, I'm just about

Re: [R] Use 2 ifelse to sort data

2010-02-23 Thread Uwe Ligges
Or do it using a function that is designed for that task as in: a - 1:20 cut(a, breaks = c(0, 5, 10, 20), labels = c(C, B, A)) Best, Uwe Ligges On 23.02.2010 05:12, David Winsemius wrote: On Feb 22, 2010, at 8:13 PM, Chunhao wrote: Dear R users, I have a question how to use 2 ifelse

Re: [R] Error with KNN

2010-02-23 Thread Uwe Ligges
On 23.02.2010 05:34, Nancy Adam wrote: Hi Uwe, Thank you for your email. I need to compute one value indicating to the performance of knn but I don’t know anything other than MSE. Can you please tell me how I do that? Hi Nancy, since knn is a classification method, I think MSE is a

Re: [R] how to assess the significance of regression between a set of response and predictor variables

2010-02-23 Thread Bert Gunter
?? z - manova(y~x) summary(z) ?summary.manova Bert Gunter Genentech Nonclinical Statistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Manabu Sakamoto Sent: Tuesday, February 23, 2010 4:39 AM To: r-help@r-project.org Subject:

Re: [R] problem installing cairo on freebsd

2010-02-23 Thread Ben Madin
G'day Rainer, I just wanted to say thank you again, this tip has saved me again. cheers Ben On 07/08/2009, at 1:33 , Rainer Hurling wrote: Late, but hopefully not too late ... Ben, I had same problem with Cairo-1.4-5 on FreeBSD CURRENT-8.0 (i386). On of the authors of Cairo

Re: [R] export tables to Excel files

2010-02-23 Thread RICHARD M. HEIBERGER
Please consider RExcel, which allows complete integration of R and Excel. See http://rcom.univie.ac.at for details and examples including a video. RExcel works in both directions (R to Excel, Excel to R) with Excel 2010, 2007, 2003, and 2002. Rich [[alternative HTML version deleted]]

Re: [R] Fortune candidate! Re: new to R Project

2010-02-23 Thread spencerg
On 2/23/2010 5:07 AM, Cedrick Johnson wrote: library(rant) I'm sorry: I'm not familiar with the rant package. I couldn't find it on CRAN. I recall just over a year ago (Fall08) when I was new to the R language. I realize there's a steep curve in any language, especially with R and the

Re: [R] Accelerated failure time interpretation of coefficients

2010-02-23 Thread Dimitris Rizopoulos
On 2/23/2010 3:37 PM, Philipp Rappold wrote: I have one more conceptual question though, it would be fantastic if someone could graciously help out: I am using an accelerated failure time model with time-varying covariates because I assume that my independent variables have a different impact

[R] Iterative Closest Point (ICP) - Implementation of algorithm in R?

2010-02-23 Thread Dr. Hans-Joachim Klemmt
Dear ladies and gentleman, does anybody know an implementation of the ICP-algorithm (Iterative closest point-algorithm) in R? Thank you very much! Best regards Hans-Joachim Klemmt -- Dr. Hans-Joachim Klemmt Forstoberrat Bayerische Landesanstalt für Wald und Forstwirtschaft zugewiesen an

Re: [R] lmom: plotting log Pearson Type III

2010-02-23 Thread J. R. M. Hosking
Hutchinson,David [PYR] wrote: Can anyone show me how to add a log Pearson type III plot using the evdistq() command to an extreme value plot using the lmom package? Attached sample code below... Thanks in advance, Dave library(lmom) # annual maximum daily streamflows Mackenzie River

Re: [R] Normal distribution (Lillie.test())

2010-02-23 Thread Bosken
Hi, Thanks for your reaction; How do you come to the decision that my data not is normal distributed? With the 69-95-99.7 test and Q-Q plot seems it ok! But these test are not exact, they only give you an image. Gr. Bosken -- View this message in context:

[R] Iterative Closest Point (ICP) - Implementation of algorithm in R?

2010-02-23 Thread Dr. Hans-Joachim Klemmt
Dear ladies and gentleman, does anybody know an implementation of the ICP-algorithm (Iterative closest point-algorithm) in R? Thank you very much! Best regards Hans-Joachim Klemmt -- Dr. Hans-Joachim Klemmt Forstoberrat Bayerische Landesanstalt für Wald und Forstwirtschaft zugewiesen an

[R] deleting column from data frame

2010-02-23 Thread Knut Krueger
Hi to all, test - data.frame(X=c(1:4),Y=c(5:8),Z=c(8:11)) test - test[,-2] Is there a way to specify the col name Y to delete instead the number? Kind regards Knut __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] axes limits in do3d

2010-02-23 Thread drlasher
ALso meant to say there are no warnings when I run the code as shown here. It just doesn't change the scale of the axes. -- View this message in context: http://n4.nabble.com/axes-limits-in-do3d-tp1565754p1565919.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] export tables to Excel files

2010-02-23 Thread Hrishi Mittal
Richard, is it possible to use RExcel under Linux, not to interface with Excel of course but to read and write Excel files? - Try http://prettygraph.com Pretty Graph , the easiest way to make R-powered graphs on the web. -- View this message in context:

[R] how to pass external parameters to an R script

2010-02-23 Thread mauede
How, if possible, can I run an R script, from command line, passing external parameters just like I can run a C main program passing parameters: # Cprog p1 p2 p3 Cprog can access its arguments (p1,p2,p3) through the built-in structures argv and argc. Since R is built on C language I would

Re: [R] Accelerated failure time interpretation of coefficients

2010-02-23 Thread Philipp Rappold
Dimitris, thanks for your detailled answer and the literature recommendation. However, I'm still wondering about the interpretation of coefficients in the AFT model with time-varying covariates. The precise question is: How can I interpret a single coefficient if my assumption is that an

Re: [R] difference between date and times

2010-02-23 Thread Ista Zahn
Hi Karine, time1 - as.POSIXct(2007-02-21 05:19:00) time2 - as.POSIXct(2007-02-20 14:21:53) difftime(time1, time2) should get you started. -Ista On Tue, Feb 23, 2010 at 9:48 AM, karine heerah karine.hee...@hotmail.fr wrote: Hi, I have date and time in a format like this: 2007-02-21

Re: [R] how to pass external parameters to an R script

2010-02-23 Thread Ista Zahn
Hi Maura, See ?Rscript -Ista On Tue, Feb 23, 2010 at 10:45 AM, mau...@alice.it wrote: How, if possible, can I run an R script, from command line, passing external parameters just like I can run a C main program passing parameters: # Cprog p1 p2 p3 Cprog can access its arguments

Re: [R] deleting column from data frame

2010-02-23 Thread David Winsemius
On Feb 23, 2010, at 10:13 AM, adam naples wrote: try test - subset(test, select = -c(Y)) That approach has the deficiency (or feature?) that it will throw an error if Y is not a column in test, whereas test[ , -grep(Y, names(test))] will not. However, the grep approach will return an

Re: [R] deleting column from data frame

2010-02-23 Thread Todd Ogden
There might be more elegant ways, but this will do it: test-test[-match(Y,names(test))] On Feb 23, 2010, at 7:04 AM, Knut Krueger wrote: Hi to all, test - data.frame(X=c(1:4),Y=c(5:8),Z=c(8:11)) test - test[,-2] Is there a way to specify the col name Y to delete instead the number? Kind

[R] RODBC to import/export xls files

2010-02-23 Thread Ivan Calandra
Dear R users, I've learned today about RODBC package in order to import xls file to dataframes and export the dataframes to xls files. However I have some problems. Please excuse me if these are basic but as I said, I've just begun with this package. Also this email is quite long, but

Re: [R] difference between date and times

2010-02-23 Thread Benilton Carvalho
dd = as.POSIXlt(c(2007-02-21 05:19:00, 2007-02-20 14:21:53), format=%Y-%m-%d %H:%M:%S) dd[1]-dd[2] b On Tue, Feb 23, 2010 at 2:48 PM, karine heerah karine.hee...@hotmail.fr wrote: Hi, I have date and time in a format like this: 2007-02-21 05:19:00. Do you which function i can use to

Re: [R] deleting column from data frame

2010-02-23 Thread S Ellison
test$Y-NULL test[Z]-NULL Todd Ogden to...@columbia.edu 23/02/2010 16:02:01 There might be more elegant ways, but this will do it: test-test[-match(Y,names(test))] On Feb 23, 2010, at 7:04 AM, Knut Krueger wrote: Hi to all, test - data.frame(X=c(1:4),Y=c(5:8),Z=c(8:11)) test - test[,-2]

Re: [R] matching on two criteria

2010-02-23 Thread jim holtman
You probably want something like this is there are multiple tags you are matching on (?paste): TazProperties2..$Area-TazProperties..$Area[match( + paste(TazProperties2..$Props2, TazProperties2..$TAZ2), + paste(TazProperties..$Props, TazProperties..$TAZ))] TazProperties2.. Props2

Re: [R] deleting column from data frame

2010-02-23 Thread Henrique Dallazuanna
One more option: transform(test, Y = NULL) On Tue, Feb 23, 2010 at 9:04 AM, Knut Krueger r...@krueger-family.de wrote: Hi to all, test - data.frame(X=c(1:4),Y=c(5:8),Z=c(8:11)) test - test[,-2] Is there a way to specify the col name  Y to delete instead the number? Kind regards Knut

[R] First. Last. Data row selection

2010-02-23 Thread wookie1976
I am in the process of switching from SAS over to R. I am working on very large CSV datasets that contain vehicle information. As I am processing the data, I need to select the first (or sometimes the second) record (by date) for any records that have the same license plate number. In SAS,

Re: [R] First. Last. Data row selection

2010-02-23 Thread Nutter, Benjamin
I've attached some functions I've written based on previous questions that have been posted here. Unfortunately, I was too lazy to give credit to previous commenters in my Rd file, and for that I hope they'll forgive me. In any case, please be assured that the functions I've attached are in no

Re: [R] RODBC to import/export xls files

2010-02-23 Thread Henrique Dallazuanna
see below: On Tue, Feb 23, 2010 at 2:16 PM, Ivan Calandra ivan.calan...@uni-hamburg.de wrote: Dear R users, I've learned today about RODBC package in order to import xls file to dataframes and export the dataframes to xls files. However I have some problems. Please excuse me if these are

[R] library(ipred)

2010-02-23 Thread Amy Hessen
Hi, I’m trying to install ipred package but I receive the following error message: library(ipred) Loading required package: rpart Loading required package: MASS Loading required package: mlbench Error: package 'mlbench' could not be loaded In addition: Warning messages: 1: package 'ipred'

Re: [R] adding infrequent date labels to x-axis

2010-02-23 Thread emorway
Hi Hrishi, With regard to the post you helped me out with, I've got my graph almost dialed in the way I would like it. There was one more small thing my searches have been unable to turn up. I've tried searching with stagger labels offset Labels alternate labels to no avail. the pertinent

[R] regression tree for censored data

2010-02-23 Thread paaventhan jeyaganth
Dear r-users, i am developing regression tree for censored data, I have difficulty purning the tree, I choose the smallest of the cp , minimizing the predictive error (xerror) but this is not enough, i still have big tree. if anybody know about he pruning Technique, could you please sent

[R] Name for factor's levels with contr.sum

2010-02-23 Thread Andreas Wittmann
Hi R-useRs, after having read http://tolstoy.newcastle.edu.au/R/help/05/07/8498.html with the same topic but five years older. the solution for a contr.sum with names for factor levels for R version 2.10.1 will be to comment out the following line #colnames(cont) - NULL in contr.sum i

Re: [R] e1071: Cannot predict probabilities

2010-02-23 Thread Mikkel Meyer Andersen
Hi, Thanks a lot for making me aware of that SVM-Type. I just thought it would give a warning or an error if C-classification wasn't used. The solution in my real case was to make the response variable a factor, i.e. before I had Y ~ . with Y numeric. If I first converted Y to a factor, i.e. Y -

Re: [R] Importing a file to r

2010-02-23 Thread John Kane
I've never tried reading in an Excel file. I usually just export the file as a csv file and read it in using read.csv(). --- On Tue, 2/23/10, Luis Felipe Parra felipe.pa...@quantil.com.co wrote: From: Luis Felipe Parra felipe.pa...@quantil.com.co Subject: [R] Importing a file to r To:

Re: [R] how to pass external parameters to an R script

2010-02-23 Thread Sharpie
mauede wrote: How, if possible, can I run an R script, from command line, passing external parameters just like I can run a C main program passing parameters: # Cprog p1 p2 p3 Cprog can access its arguments (p1,p2,p3) through the built-in structures argv and argc. Since R is built

Re: [R] Importing a file to r

2010-02-23 Thread Jorge Ivan Velez
Hi Luis, Take a look at http://wiki.r-project.org/rwiki/doku.php?id=tips:data-io:ms_windows for some ideas. HTH, Jorge On Tue, Feb 23, 2010 at 3:06 PM, Luis Felipe Parra wrote: Hello I am trying to import the attached file Curva LIBOR to R. I am trying to use the following commands and

Re: [R] Importing a file to r

2010-02-23 Thread Jorge Ivan Velez
Please ignore the link I sent before, it is wrong. Apologies to all. Instead, please see http://rwiki.sciviews.org/doku.php?id=tips:data-io:ms_windowss=excel --JIV On Tue, Feb 23, 2010 at 3:35 PM, Jorge Ivan Velez wrote: Hi Luis, Take a look at

Re: [R] library(ipred)

2010-02-23 Thread Mikkel Meyer Andersen
Hi. Looking at http://cran.r-project.org/web/packages/mlbench/index.html I get the feeling that R (≥ 2.10.0) is a requirement. What does a version give you? Cheers, Mikkel. 2010/2/23 Amy Hessen amy_4_5...@hotmail.com: Hi, I’m trying to install ipred package but I receive the following

Re: [R] First. Last. Data row selection

2010-02-23 Thread Steve Taylor
These tell you the first and last row for each plate: !duplicated(df$plate) !duplicated(df$plate, fromLast=TRUE) Hope that helps. Steve From: wookie1976 joe.roesc...@revecorp.com To:r-help@r-project.org Date: 24/Feb/2010 6:54 a.m. Subject: [R] First. Last. Data row selection I am in

[R] select row based on highest value

2010-02-23 Thread LCOG1
Please consider the following #Data to use Props-c(p754921,p754921 ,p754921,p75506 ,p75506 ,p75506,p75506,p75508,p75508,p75508,p75508,p75508) TAZ-c(38,37,37,171,171,282,171,46,46,169,169,169) Area-c(109828.04, 128134.71, 46469.57, 37160.21, 40080.50,344679.66,16972.28, 342309.558,

Re: [R] Failed install of package xlsReadWrite

2010-02-23 Thread Doug Hill
Hi, all. I too got this error, and when I went to register the correct DLL (thinking the one downloaded but not installed might have been the development version) I got an error that the registration had failed. What I typed: C:\Program Files\R\R-2.10.0\library\xlsReadWrite\libsregsvr32

Re: [R] Failed install of package xlsReadWrite

2010-02-23 Thread Doug Hill
Sorry, forgot to mention I'm running R 2.10 on Windows 7, and I ran the command window as Administrator. Thanks, Doug -- View this message in context: http://n4.nabble.com/Failed-install-of-package-xlsReadWrite-tp1476880p1566479.html Sent from the R help mailing list archive at Nabble.com.

[R] Turn three Columns into a Matrix?

2010-02-23 Thread Ortiz, John
Hi all, If I have a data frame with 3 columns as follows: ta Species Depth Counts spc_a 120 60 spc_a 140 140 spc_b 140 5 spc_b 150 4 spc_b 180 10 spc_c 180 10 spc_c 190 20 How can I turn it into a dataframe or matrix with this structure?:

Re: [R] Problem with strptime generating missing values where none appear to exist

2010-02-23 Thread Don MacQueen
What happens if you do all that NA checking on dob *before* subtracting 100 from dob$year? What happens if you use difftime() before subtracting the 100? Do you get any NAs if you convert dob to POSIXct? (these are just investigative ideas, obviously) -Don At 6:26 PM + 2/23/10,

[R] Importing Headers from excel files

2010-02-23 Thread Luis Felipe Parra
Hello I am trying to import an Excel file but I am loosing the headers, My headers are in the first to rows of the EXCEL file. In the following R output, the NA are supposed to be the second item in the Header. Is there any way to Import more than one row as headers?. Thank you Felipe Parra

Re: [R] export tables to Excel files

2010-02-23 Thread Tal Galili
Hi Richard, Thanks for pointing this out. BTW - How would you use Rexcel to write several data frames into several sheets in excel ? Thanks! Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me:

[R] Circles around letters or numbers in plot title

2010-02-23 Thread Nutter, Benjamin
Has anyone ever tried putting a circle around a letter or a number in a plot title? For instance, if I have a plot title Scatterplot for Subject 24, I want to put a circle around 24 to distinguish that plot from the other 30 I've generated. Any tips or ideas beyond plotting a circle in the

Re: [R] adding infrequent date labels to x-axis

2010-02-23 Thread Peter Ehlers
On 2010-02-23 12:58, emorway wrote: Hi Hrishi, With regard to the post you helped me out with, I've got my graph almost dialed in the way I would like it. There was one more small thing my searches have been unable to turn up. I've tried searching with stagger labels offset Labels alternate

Re: [R] Circles around letters or numbers in plot title

2010-02-23 Thread Peter Ehlers
On 2010-02-23 14:47, Nutter, Benjamin wrote: Has anyone ever tried putting a circle around a letter or a number in a plot title? For instance, if I have a plot title Scatterplot for Subject 24, I want to put a circle around 24 to distinguish that plot from the other 30 I've generated. Any tips

Re: [R] Importing Headers from excel files

2010-02-23 Thread Gabor Grothendieck
read.xls in the development version of the gdata package can read xls and xlsx files and could interpret both header rows by reading the file twice. Using the ExampleExcelFile.xlsx file that comes with gdata assume that the first two rows are actually headers (so the row of 1s is a header in this

Re: [R] library(ipred)

2010-02-23 Thread Jim Lemon
On 02/24/2010 06:54 AM, Amy Hessen wrote: Hi, I’m trying to install ipred package but I receive the following error message: library(ipred) Loading required package: rpart Loading required package: MASS Loading required package: mlbench Error: package 'mlbench' could not be loaded In

Re: [R] RExcel + RCOM + Linux

2010-02-23 Thread Erich Neuwirth
Remote server has to be a Windows machine also. RExcel uses (D)COM which is Windows-specific On 2/22/2010 9:14 AM, Philipp Rappold wrote: Dear all, does anyone know if it is possible to connect a Windows RExcel instance to a linux R instance? Within Rexcel, I find the option Remote

[R] Excel Data Import using RODBC

2010-02-23 Thread Luis Felipe Parra
Hello I am importing data from Excel to R using RODBC and I am ending up with the following data frame: names(AbioRep) [1] Date US0001W Index US0002W Index US0001M Index US0002M Index US0003M Index US0004M Index US0005M Index US0006M Index [10] US0007M Index US0008M Index US0009M Index

[R] importing S4 methods using a namespace

2010-02-23 Thread Aaron Rendahl
I want to call summary on a mer object (from lme4) within my package but I can't seem to get the namespace to import the necessary method. I've simplified my package to this one function: --- ss - function(m) { summary(m) } --- And my namespace

Re: [R] select row based on highest value

2010-02-23 Thread LCOG1
Ah perfect thank you. From: jholtman [via R] [mailto:ml-node+1566613-1138252725-103...@n4.nabble.com] Sent: Tuesday, February 23, 2010 2:00 PM To: ROLL Josh F Subject: Re: select row based on highest value Is this better: sapply(split(v, v$Prop), function(x)

Re: [R] how to rearrange a dataframe

2010-02-23 Thread David Winsemius
On Feb 23, 2010, at 4:27 PM, Laura Rodriguez Murillo wrote: Hi all, I'd appreciate if anyone can help me with this... I have a data frame that looks like this: 1 + name1 1 2 3 2 + name2 5 9 10 2 - name3 56 74 93 1 - name4 65 75 98 I need to rearrange this in a way so that the rows with 1

Re: [R] Excel Data Import using RODBC

2010-02-23 Thread David Winsemius
On Feb 23, 2010, at 5:17 PM, Luis Felipe Parra wrote: Hello I am importing data from Excel to R using RODBC and I am ending up with the following data frame: names(AbioRep) [1] Date US0001W Index US0002W Index US0001M Index US0002M Index US0003M Index US0004M Index US0005M Index

[R] GenABEL - problems with load.gwaa.data

2010-02-23 Thread Yesha Patel
Hi all! I am using GenABEL on R for GWAS analysis. I am having a couple of issues: First, I am having a problem reading files (.map, .ped, size 900Mb, using windows 32-bit) onto R in the convert.snp.ped statement. I am thinking this problem is likely due to the large size of the files my

[R] subtracting 100 from strptime year vector generates missing values in POSIXct where none appear to exist in strptime year vector

2010-02-23 Thread Jonathan Williams
Thanks Don MacQueen for this reply to my initial query - please SEE MY REPLIES TO THESE IDEAS AND FURTHER INFORMATION BELOW From: Don MacQueen [m...@llnl.gov] Sent: 23 February 2010 21:25 To: Jonathan Williams; r-help@r-project.org Subject: Re: [R] Problem with strptime generating missing

Re: [R] colour highlighting inputs and outputs in the R terminal?

2010-02-23 Thread Liviu Andronic
Hello On 2/23/10, Marc Schwartz marc_schwa...@me.com wrote: I was not aware of Romain's xterm256 package, but from a quick review of the manual, it would appear to not support an automated syntax highlighting capability. One seems to need to explicitly print output to the console using

[R] Extracting individual parameter estimates from mmlcr

2010-02-23 Thread Rben
I am new to mmlcr and am working on a latent class mixture model attempting to identify the trajectory and number of classes that best describes my data. I am able to find model parameters such as degrees of freedom, loglikelihood, and BIC. For example, here is a cubic 3-class model I am using.

Re: [R] how to rearrange a dataframe

2010-02-23 Thread Tom Short
Try this: a - b - read.table(textConnection( 1 + name1 1 2 3 2 + name2 5 9 10 2 - name3 56 74 93 1 - name4 65 75 98), skip=1, header=FALSE) swapidx - with(a, (V1 == 2 V2 == +) | (V1 == 1 V2 == -)) b[swapidx,] - b[swapidx, c(1:3,6:4)] This creates an indexing vector that identifies which rows

  1   2   >