Re: [R] removed data is still there!

2010-09-24 Thread Prof Brian Ripley
On Thu, 23 Sep 2010, Peter Ehlers wrote: On 2010-09-21 5:51, Nikhil Kaza wrote: example(factor) iris1$Species- factor(iris1$Species, drop=T) will get you what you need. Hmm, doesn't work for me. ?factor does not list a 'drop=' argument. I suspect iris1$Species - [iris1$Species,

Re: [R] plotting multiple animal tracks against Date/Time

2010-09-24 Thread Struve, Juliane
Great, thanks ! It works beautifully now. Dr. Juliane Struve Daphne Jackson Fellow Imperial College London Department of Life Sciences Silwood Park Campus Buckhurst Road Ascot, Berkshire, SL5 7PY, UK Tel: +44 (0)20 7594 2527 Fax: +44 (0)1344 874 957

Re: [R] plotting multiple animal tracks against Date/Time

2010-09-24 Thread Struve, Juliane
Hello, thank you very much for replying. I have tried this, but I get error message Error in .subset(x, j) : invalid subscript type 'list' after z1 - read.zoo(textConnection(Lines1), skip = 1, index = list(1, 2), FUN = dt) Regards, Juliane Dr. Juliane Struve Daphne Jackson Fellow

[R] Data manipulation in R

2010-09-24 Thread Thomas Parr
If this has already been answered, my apologies in advance I am relatively new to this aspect of [R]. it is a bit of a basic question. I have 4 columns of data (site, Date, measurement type, value) in a tab delimited text file. Site is a site where measurements were collected, Date is a date

[R] multivariate multiple regression coefficient

2010-09-24 Thread 서은경
hi, I considered multivariate multiple regression for respons, predictor, each 5 dimension. on going process, through initb - eigen(temp)$vectors[,1:3] temp - vhalf%*%Kproduct(Ir,initb) (herein 'vhalf' is root for inverse of covariance matrix and 'Kproduct' is

Re: [R] removed data is still there!

2010-09-24 Thread Prof Brian Ripley
On Fri, 24 Sep 2010, Prof Brian Ripley wrote: On Thu, 23 Sep 2010, Peter Ehlers wrote: On 2010-09-21 5:51, Nikhil Kaza wrote: example(factor) iris1$Species- factor(iris1$Species, drop=T) will get you what you need. Hmm, doesn't work for me. ?factor does not list a 'drop=' argument. I

[R] change tick spacing on the axis of a plot.

2010-09-24 Thread skan
Hello How can I change the spacing of tick marks on the axis a plot? What parameters should I use on base plot or on rgl? cheers -- View this message in context: http://r.789695.n4.nabble.com/change-tick-spacing-on-the-axis-of-a-plot-tp2553149p2553149.html Sent from the R help mailing list

Re: [R] how to make point character thicker in the legend of xyplot?

2010-09-24 Thread Deepayan Sarkar
On Fri, Sep 24, 2010 at 7:39 AM, Peter Ehlers ehl...@ucalgary.ca wrote: On 2010-09-23 17:57, array chip wrote: Yes, it does what I want. Thank you Peter! Just wondering what else grid.pars controls? not just the symbol in legend, right? John You can have a look at ?gpar (after loading

Re: [R] Lattice xyplot and groups

2010-09-24 Thread Deepayan Sarkar
On Wed, Sep 22, 2010 at 12:21 AM, Axel axelg...@gmail.com wrote: Hi, I'm trying to plot many (x, y) data files using the xyplot function from the lattice package. Each file can be classified by set name (s1, s2,...) and data type (A, B, ...). Each data set contains a different number of

Re: [R] Data manipulation in R

2010-09-24 Thread Dennis Murphy
Hi: Please provide a minimal reproducible example that resembles your real data so that people can try it out and provide potential solutions for you. Show what you tried that failed, and what you expect. A number of people on this list are very adept in data summarization, but most of them are

[R] delete d-jackknife with R ?

2010-09-24 Thread Lise Bellanger
Hello, I would like to know if there exists a function in a library or code development in /R/ to do delete d-jackknife ? In fact, instead of leaving out one observation at a time as with jackknife, we leave out /d/ observations. Thank you very much for your answer ! Lise

Re: [R] looking for a faster way to compare two columns of a matrix

2010-09-24 Thread Michael Bedward
Hello Gustavo, Not sure if I've got all the details of your metric, but what about this... xx - x[ , combn(5,2)] i - seq(2, ncol(xx), 2) colSums(xx[,i-1] xx[,i] xx[,i] 0) / colSums(xx[,i] 0) Michael On 24 September 2010 02:53, Gustavo Carvalho gustavo.bi...@gmail.com wrote: Please

[R] Problem with any()

2010-09-24 Thread Christofer Bogaso
Hi I have following line of code: any(as.integer(c(1, 3))) == 3 [1] FALSE Shouldn't I expect it is true? Thanks, __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Problem with any()

2010-09-24 Thread Jonas Mandel
Hello, try this way : any(as.integer(c(1, 3))==3) cheers, Jonas Christofer Bogaso a écrit : Hi I have following line of code: any(as.integer(c(1, 3))) == 3 [1] FALSE Shouldn't I expect it is true? Thanks, __ R-help@r-project.org

Re: [R] Problem with any()

2010-09-24 Thread Chris Mcowen
Hi Christofer, I have just repeated this and changed the code a little and it gives the correct result any(as.integer(c(1, 3)) == 3) [1] TRUE any(as.integer(c(1, 3)) == 2) [1] FALSE any(as.integer(c(1, 3)) == 1) [1] TRUE HTH Chris On 24 Sep 2010, at 10:07, Christofer Bogaso wrote:

Re: [R] Update RMySQL and ... it's no more running

2010-09-24 Thread PtitBleu
Hello, After an upgrade, RGui was crashing each time I was trying to connect to MySQL database. The error message was again : 'RMySQL was compiled with MySQL 5.0.67 but loading MySQL 5.1.44' I found an https://stat.ethz.ch/pipermail/r-sig-db/2009q1/000572.html old discussion giving this

Re: [R] Solving equations involving gamma functions

2010-09-24 Thread Berend Hasselman
Shant Ch wrote: Hi, I want to find a value of n1. I used the following code but I am getting the error - Error in as.vector(x, mode) : cannot coerce type 'closure' to vector of type 'any' n=10 a_g-(1/(n*(n-1)))*((pi/3)*(n+1)+(2*sqrt(3)*(n-2))-4*n+6) a_s-function(n1)

[R] boundary check

2010-09-24 Thread Feng Li
Dear R, I have a covariates matrix with 10 observations, e.g. X - matrix(rnorm(50), 10, 5) X [,1][,2][,3][,4] [,5] [1,] 0.24857135 0.30880745 -1.44118657 1.10229027 1.0526010 [2,] 1.24316806 0.36275370 -0.40096866 -0.24387888 -1.5324384 [3,]

Re: [R] loadlibrary failure

2010-09-24 Thread Eduardo Erviti Lopez
We have got this problem,: library (RMySQL) Error : .onLoad failed in loadNamespace() for 'RMySQL', details: call: inDL(x, as.logical(local), as.logical(now), ...) error: imposible cargar la biblioteca compartida 'C:/ARCHIV~1/R/R-211~1.1/library/RMySQL/libs/RMySQL.dll':

Re: [R] change tick spacing on the axis of a plot.

2010-09-24 Thread Jim Lemon
On 09/24/2010 05:42 PM, skan wrote: Hello How can I change the spacing of tick marks on the axis a plot? What parameters should I use on base plot or on rgl? Hi skan, The usual way this is done is to suppress the axes in the plot: plot(...,axes=FALSE) and then add the axes individually:

[R] Odp: Data manipulation in R

2010-09-24 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 24.09.2010 05:41:30: If this has already been answered, my apologies in advance I am relatively new to this aspect of [R]. it is a bit of a basic question. I have 4 columns of data (site, Date, measurement type, value) in a tab delimited text

[R] Inaccuracy of kummerU (fAsianOptions) (Tricomi function)

2010-09-24 Thread Antonio José Sáez Castillo
Hello, I need to use the confluent function of second kind, also known as Tricomi function. It is implemented as kummerU() function in fAsianOptions package, but I've found very inaccurate values, comparing with those provided by Mathematica. I think Mathematica values are OK because kummerU

Re: [R] boundary check

2010-09-24 Thread Robin Hankin
Hello convex hulls in large numbers of dimensions are hard. For your problem, though, one can tell whether a given point is inside or outside by using linear programming: X - matrix(rnorm(50), 10, 5) x_i - matrix(rnorm(5), 1, 5) isin.chull function(candidate,p,plot=FALSE,give.answers=FALSE,

Re: [R] boundary check

2010-09-24 Thread Michael Bedward
Hello, If an N-dimensional convex hull fits your idea of a smallest ball then you could try the convhulln function in the geometry package. For testing if a new point is inside a previously derived hull, one brute force approach is to rbind the new point to your data, generate a new hull and see

Re: [R] randomForest - PartialPlot - reg

2010-09-24 Thread Liaw, Andy
In a partial dependence plot, only the relative scale, not absolute scale, of the y-axis is meaningful. I.e., you can compare the range of the curves between partial dependence plots of two different variables, but not the actual numbers on the axis. The range is compressed compared to the

[R] cv.binary

2010-09-24 Thread Chris Mcowen
Dear List, I am looking to perform a cross validation on my glm using the cv.binary function in DAAG. However i am getting the following error - cv.binary(modelhe) Error in sample(nfolds, m, replace = TRUE) : invalid 'size' argument Any help would be greatly appreciated. Chris

Re: [R] loadlibrary failure

2010-09-24 Thread PtitBleu
Hello Eduardo, Maybe have a look at this thread : http://r.789695.n4.nabble.com/Update-RMySQL-and-it-s-no-more-running-td1561401.html#a1561401 Update RMySQL and ... it's no more running The last message gives a link to a procedure to configure RMySQL. It worked for me. Have a nice week-end,

[R] Great Canadian Sportsman's September Newsletter

2010-09-24 Thread Great Canadian Sportsman
[[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained,

Re: [R] glm binomial loglog (NOT cloglog) link

2010-09-24 Thread William Simpson
I was looking at different link functions for binomial glms recently for the same reason as you (more zeros than ones). I did a bit of reading up on the various link functions and IIRC, you can use the cloglog link on your data, just turn your 0's into 1's and vice versa. This was stated in the

Re: [R] randomForest - PartialPlot - reg

2010-09-24 Thread Vijayan Padmanabhan
Thanks for the elaborate detailing. I see sense now. Regards Vijayan Padmanabhan What is expressed without proof can be denied without proof - Euclide. Liaw, Andy andy_l...@merck.com 09/24/2010 04:31 PM To Vijayan Padmanabhan v.padmanab...@itc.in, r-help r-help@r-project.org cc

Re: [R] boundary check

2010-09-24 Thread baptiste auguie
Hi, I remember a discussion we had on this list a few months ago for a better way to decide if a point is inside a convex hull. It eventually lead to a R function in this post, http://tolstoy.newcastle.edu.au/R/e8/help/09/12/8784.html I don't know if it was included in the geometry package in

Re: [R] Lattice xyplot and groups

2010-09-24 Thread Axel
That would be the logically correct approach. Here are a couple of ways to specify color: That's perfect! Thank you very much. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] boundary check

2010-09-24 Thread Feng Li
Thanks. I agree with you that the speed and memory issues might be (actually is) a big problem for big dimensions. It is interesting to know to solve this by using linear programming. Buy the way, it seems a potential bug in your function if you try this X - matrix(rnorm(50), 10, 5)

Re: [R] boundary check

2010-09-24 Thread Keith Jewell
Hi, Below Baptiste's message I attach the R code and the .Rd documentation I treated as 'final', it may be slightly different from that in the Dec 2009 post. I did submit if for inclusion in the geometry package, but last time I checked it wasn't there. I have found (and others have

[R] Error: unable to load shared library tcltk.so

2010-09-24 Thread Alla Bulashevska
Dear R users, when trying library(tcltk) i become following error: Loading Tcl/Tk interface ... Error : .onLoad failed in loadNamespace() for 'tcltk', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared library

Re: [R] boundary check

2010-09-24 Thread Robin Hankin
Feng thanks for this. The problem you report is reproducible; it originates from simplex() of the boot packge. It is ultimately due to the fact that x_i is precisely *on* the convex hull, which is evidently causing problems. I'll investigate it. In the short term, you can break the

[R] Standard Error for difference in predicted probabilities

2010-09-24 Thread Andrew Miles
Is there a way to estimate the standard error for the difference in predicted probabilities obtained from a logistic regression model? For example, this code gives the difference for the predicted probability of when x2==1 vs. when x2==0, holding x1 constant at its mean: y=rbinom(100,1,.4)

Re: [R] cv.binary

2010-09-24 Thread Steve Lianoglou
Hi Chris, On Fri, Sep 24, 2010 at 7:04 AM, Chris Mcowen chrismco...@gmail.com wrote: Dear List, I am looking to perform a cross validation on my glm using the cv.binary function in DAAG. However i am getting the following error - cv.binary(modelhe) Error in sample(nfolds, m, replace =

[R] relaimpo

2010-09-24 Thread Jyotin Modha
Hello, Does anyone know if relaimpo only applies to pure multiple linear regression models, i.e. - linear in the variables AND linear in the coefficients or is it safe to use it in models that are: - non-linear in the variables BUT linear in the coefficients?

[R] 95% CI of Kaplan-Meier survival in package survival

2010-09-24 Thread Wu Gong
Hi: My result using Kaplan-Meier estimate in survival package was inconsistent with that from Minitab. The survival probabilities are same, but their 95% CI are different from other calculation. Could you help me find what is wrong with the code? Thanks in advance. library(survival) raw.a -

[R] color of lines while printing through for loop

2010-09-24 Thread Jonas Josefsson
I am trying to find a convenient way to control line colors when printing from a for loop using the lines command. Right now I have solved this by creating a colors vector that is refered to in the loop with index. However, the colors choosen here are just 1,2,3,4,5... I would like to get

Re: [R] Standard Error for difference in predicted probabilities

2010-09-24 Thread Darin A. England
I think you can use the bootstrap to obtain the std error. My attempt for your problem and data is below. I would be interested if anyone can point out a problem with this approach. Darin y=rbinom(100,1,.4) x1=rnorm(100, 3, 2) x2=rbinom(100, 1, .7) diff - vector(mode=numeric, length=200) for (i

[R] Some questions about string processing

2010-09-24 Thread Michael Hopkins
Hi all A couple of questions about string processing from someone who has only scratched the surface so far. 1) I am wanting to send some strings into a function to allow flexibility inside. My first idea has been e.g. auto_io - function( var_string, factors ) { # e.g. var_string sent as

Re: [R] Some questions about string processing

2010-09-24 Thread Phil Spector
Michael - You're doing too much work half the time, and not enough the other half :-). Try this (untested): auto_io = function(data_name,factors){ resp_data = read.table(data_name, header = TRUE ) temp_model = lm(formula(paste('y',factors,sep='~')) data = resp_data ) .

Re: [R] bptest

2010-09-24 Thread Peng, C
you have to load package {lmtest} first. That is, library(lmtest) bptest(modelCH, data=KP) -- View this message in context: http://r.789695.n4.nabble.com/bptest-tp2553506p2579815.html Sent from the R help mailing list archive at Nabble.com. __

[R] Splitting a time + duration into a series of periods

2010-09-24 Thread Travers Naran
Hi all, Here's what I have. I have a list of log-in times for users and how long their sessions were. user, login_time, session_min alice, 2010/01/01 10:00, 145 bob, 2010/01/01 11:00, 30 What I want to do is create a bar chart showing, in 1/2 hour segments, the number of users logged in at the

Re: [R] Problem with any()

2010-09-24 Thread Peng, C
Is as.integer() redundant for this vector of integers? any(c(1, 3) == 3.0 ) -- View this message in context: http://r.789695.n4.nabble.com/Problem-with-any-tp2553226p2580659.html Sent from the R help mailing list archive at Nabble.com. __

[R] performing script on multiple files

2010-09-24 Thread Jonas Josefsson
say that I have a script that uses read.csv to read a textfile in a certain directory, then transforming the data a bit and then spit out a new file in an output directory. Is it possible to make this universal so the same procedure is made for all files in a certain directory and also make it

Re: [R] Splitting a time + duration into a series of periods

2010-09-24 Thread Phil Spector
Travers - R's date/time abilities are pretty powerful -- you shouldn't have to resort to outside programs. Here's how I'd approach the problem: dat = read.csv(textConnection('user, login_time, session_min + alice, 2010/01/01 10:00, 145 + bob, 2010/01/01 11:00, 30 +

Re: [R] performing script on multiple files

2010-09-24 Thread Phil Spector
Jonas - Here's an (untested) idea: readwrite = function(file,outputdirectory){ dat = read.csv(file) . . . write.csv(dat,file = paste(outputdirectory,sub('\\.csv','.new',file),sep='/')) } sapply(list.files('.',pattern='\\.csv$'),readwrite,'/some/location') It will read

Re: [R] Splitting a time + duration into a series of periods

2010-09-24 Thread Henrique Dallazuanna
Try this: findInterval(do.call(seq, c(as.list(as.POSIXct(DF$login_time)), by = '30 mins')), as.POSIXct(DF$login_time)) On Fri, Sep 24, 2010 at 4:32 PM, Travers Naran tna...@gmail.com wrote: Hi all, Here's what I have. I have a list of log-in times for users and how long their sessions

Re: [R] delete d-jackknife with R ?

2010-09-24 Thread Peng, C
You may want to use combinations() in package {gtools} and write a function with a few lines to perform your leave-k-out procedure. -- View this message in context: http://r.789695.n4.nabble.com/delete-d-jackknife-with-R-tp2553192p2585783.html Sent from the R help mailing list archive at

Re: [R] boundary check

2010-09-24 Thread Greg Snow
You did not originally define ball, the other respondents have discussed using a convex hull, but here is another approach: Use ball to mean sphere (or technically hypersphere) and find the sphere with the smallest radius that contains all the points, optim or other optimizers could be

[R] Fitting GLMM models with glmer

2010-09-24 Thread Clodio Almeida
Hi everybody: I´m trying to rewrite some routines originally written for SAS´s PROC NLMIXED into LME4's glmer. These examples came from a paper by Nelson et al. (Use of the Probability Integral Transformation to Fit Nonlinear Mixed-Models with Nonnormal Random Effects - 2006). Firstly the authors

[R] Object Browser

2010-09-24 Thread wxffxw
What's the best object browser? Dear all, I have tried all the popular R IDE or editors like Eclipse, Komodo, JGR, Revolution... They all have fancy fucntions like auto completion, syntax highlight BUT, I JUST WANT A OBJECT BROWSER! The easiest way to view objects in R console is fix(),

Re: [R] plotting multiple animal tracks against Date/Time

2010-09-24 Thread Gabor Grothendieck
On Fri, Sep 24, 2010 at 4:16 PM, Struve, Juliane j.str...@imperial.ac.ukwrote: Hi again, when applying the code to my real data I need to deal with a large number of individuals and massive data sets. I am using the code below to read in the data for different individuals, and would like to

[R] How to read this file into R.

2010-09-24 Thread Changbin Du
Dear community, I have one file named ca_boost_feature.txt, Feature selection (Boosting:0.0025,5)! H.2.C C.1.D C.3.R E.0.N C.2.S C.0.G H.3.G log file: ep If I want to use the second line of this file, how to read it into R? varr-read.table(/home/cdu/operon/carbonic/ca_boost_feature.txt, sep=

Re: [R] How to do a trig regression

2010-09-24 Thread Aaditya Nanduri
Thank you all very much for your help. Unfortunately I do not have the data to test out the ideas suggested but I was able to find a good approximation using another software package. I will try to get the data for this problem so I can find out how to do it in R as I am very much interested in

Re: [R] How to read this file into R.

2010-09-24 Thread Phil Spector
Changbin - If you want the entire line, use readLines('~/ca_boost_feature.txt',warn=FALSE)[2] [1] H.2.C C.1.D C.3.R E.0.N C.2.S C.0.G H.3.G If you want a vector with the contents of the line, use scan('~/ca_boost_feature.txt',skip=1,n=7,what='') Read 7 items [1] H.2.C C.1.D C.3.R

Re: [R] How to read this file into R.

2010-09-24 Thread Changbin Du
Thanks so much, Phil! On Fri, Sep 24, 2010 at 2:45 PM, Phil Spector spec...@stat.berkeley.eduwrote: Changbin - If you want the entire line, use readLines('~/ca_boost_feature.txt',warn=FALSE)[2] [1] H.2.C C.1.D C.3.R E.0.N C.2.S C.0.G H.3.G If you want a vector with the contents of

Re: [R] color of lines while printing through for loop

2010-09-24 Thread Patrick Connolly
On Fri, 24-Sep-2010 at 06:11PM +0200, Jonas Josefsson wrote: I am trying to find a convenient way to control line colors when printing from a for loop using the lines command. Right now I have solved this by creating a colors vector that is refered to in the loop with index. However, the

[R] POSIXct: Extract the hour for a list of elements

2010-09-24 Thread Matthew Pettis
Hi, I have a list/data.frame 'pk' of POSIXct dates, and I'd like to extract the hour for each row. I know that if I have an individual POSIXct object, I can extract the hour by converting to a new object with: new.lt - as.POSIXlt(single POSIXct object) new.lt$hour But I can't figure out how to

[R] layout of lattice graphics

2010-09-24 Thread Jonathan Flowers
Hi all, I am trying to pickup lattice graphics in R and having difficulty with simple layout of plots. I have created a series of levelplots and would like to plot them to a single device, but need to reduce the margin areas. This is easily accomplished with par(oma) and par(mar) in the base

Re: [R] POSIXct: Extract the hour for a list of elements

2010-09-24 Thread Phil Spector
Matthew - It's a bit simpler than you think: as.POSIXlt(pk)$hour should return what you want. (If not, please provide a reproducible example.) - Phil Spector Statistical Computing Facility

Re: [R] POSIXct: Extract the hour for a list of elements

2010-09-24 Thread Matthew Pettis
Thank you! That solution worked! I thought I'd tried something similar to that, but obviously I didn't. Here's a self-contained example, for posterity and completeness: z.df - data.frame(times=c(Sys.time(), Sys.time() + 3600)) as.POSIXlt(z.df[,1])$hour And this gives me what I want. Thank

Re: [R] statistic term in boot function

2010-09-24 Thread alfredo
Hi and thanks for your replies (I'm sorry to be a bit late..), I think I might be being a bit thick on this, but I truly would not be asking if I had not already gone through the manuals and examples in the web. I just want to be sure I got Jorge's example. the function

Re: [R] plotting multiple animal tracks against Date/Time

2010-09-24 Thread Struve, Juliane
Hi again, when applying the code to my real data I need to deal with a large number of individuals and massive data sets. I am using the code below to read in the data for different individuals, and would like to create the Lines within the loop. But Lines needs to have the variable Fish_ID

[R] bptest

2010-09-24 Thread robm
Hi I'm very new to R but have plenty of experience with statistics and other packages like SPSS, SAS etc. I have a dataset of around 20 columns and 200 rows. I'm trying to fit a very simple linear model between two variables. Having done so, I want to test the model for heteroscedasticity

[R] Reading in .aux (ESRI raster files) into R

2010-09-24 Thread JoH
Dear All, I'v tried to read in data in numerous ways including:- Spain10km-data.frame(readAsciiGrid(F://RMap//sp10kpointid1.aux)) Error in readAsciiGrid(F://RMap//sp10kpointid1.aux) : object 'cellsize' not found In addition: Warning message: In readLines(t, n = 6) : incomplete final line

[R] optimizing lm with multiple very similar RHSs

2010-09-24 Thread Martin Eklund
Dear list, I would like to do something like: # Simulate some example data tmp - matrix(rnorm(50), ncol=5) colnames(tmp) - c(y,x1,x2, x3, x4, x5) # Fit a linear model with random noise added to x5 n times n - 100 replicate(n, lm(y ~ x1+x2+x3+x4+I(x5+rnorm(nrow(tmp))), data=as.data.frame(tmp)))

[R] kernlab:ksvm:eps-svr: bug?

2010-09-24 Thread Prasenjit Kapat
Hi, A. In a nutshell: The training error, obtained as error (ret), from the return value of a ksvm () call for a eps-svr model is (likely) being computed wrongly. nu-svr and eps-bsvr suffer from this as well. I am attaching three files: (1) ksvm.R from the the kernlab package, un-edited, (2)

[R] why I could not reproduce the Mandelbrot plot demonstrated on R wiki

2010-09-24 Thread xin wei
I am trying to reproduce the nice looking of Mandelbrot demonstrated by R wiki page by the following code: library(caTools)# external package providing write.gif function jet.colors = colorRampPalette(c(#7F, blue, #007FFF, cyan, #7FFF7F, yellow,

[R] Saving iterative components

2010-09-24 Thread Annalaura
Hi, I need help! I am trying to iterate an iterative process to do cross vadation and store the results each time. I have a Spatial data.frame, called Tmese str(Tmese) Formal class 'SpatialPointsDataFrame' [package sp] with 5 slots ..@ data :'data.frame': 14 obs. of 17 variables: ..

[R] Odds ratio from Logistic model in R

2010-09-24 Thread Li, Guoya
Hi, I am new to R. Anyone can explain the following from R-help or anyone can direct me how to calculate odds ratio from logistic model in R. Thank you very much. Guoya Stefano stecalza at tiscalinet.it https://stat.ethz.ch/mailman/listinfo/r-help writes: Hi all. A simple question. Is

[R] Survival graph and tables

2010-09-24 Thread adrien Penac
Hi, I'm trying to make such a graphic : http://heart.bmj.com/content/96/9/662/F1.large.jpg The curve plot is not a problem but I don't know how to represent the little table underneath with the number of survivors at given periods. Do you have any hints to achieve this ? Thanks in advance

[R] Multiple graph in one graph window

2010-09-24 Thread mrdawoud
Dear R users; Could you tell me how to let R create multiple graphs in a graph window. Please note that I am talking about creating multiple plots in the same page of the graph window. For example: g1=c(1,2,3) g2=c(3,1,7) g3=c(4,2,11) g4=c(5,5,9) ... all in one graph window. Best Regards

[R] How to change the lengend in a DA figure

2010-09-24 Thread Chen, Xi
Dear all: I have encountered a problem recently: I used to plot figure, and using code main=.., xlab=.,ylab=. to change the legend. But recently I was using R to perform Discriminant Function analysis, and I want to change the group names also add a title to the figure, but I am

[R] Power Function

2010-09-24 Thread jethi
Hi, at first, i´m from germany, so sorry for my bad english. but i need ur help in R to programm a power function and to make at last a graphik of it. i have already tried my best. but it doesn´t work.the topic is: the homogeneity test of correlation based entropy. so it means, that i have to

Re: [R] Odds ratio from Logistic model in R

2010-09-24 Thread Peng, C
The output of logisitic procdure only gives you the log(odds-ratio) and the associated standard error of the log(odds-ratio). You need to exponentiate the log(odds-ratio) to get your odds ratio. The code tells you how to obtain the odds ratio from log(odds-ratio). -- View this message in

Re: [R] Power Function

2010-09-24 Thread Joshua Wiley
Hi, What part of your code does not work or does not do what you want? I am guessing that you want gute to return more than a single value (which is what it does in your code). Can you show us an example of the results you would like? Best regards, Josh I reworked some of your code to

Re: [R] bptest

2010-09-24 Thread Steven McKinney
Hi Rob, I googled cran bptest and the first hit was for package lmtest. I installed lmtest, loaded it up, and bptest is available there. require(lmtest) Loading required package: lmtest Loading required package: zoo bptest function (formula, varformula = NULL, studentize = TRUE, data =

Re: [R] Multiple graph in one graph window

2010-09-24 Thread Dennis Murphy
Which one do you want? library(lattice) d - data.frame(x = rep(1:3, 4), g = factor(rep(1:4, each = 3)), y = c(1, 2, 3, 3, 1, 7, 4, 2, 11, 5, 5, 9)) xyplot(y ~ x | g, data = d, pch = 16) xyplot(y ~ x, data = d, groups = g, type = c('p', 'l'), pch = 16) Both provide 'multiple

Re: [R] How to change the lengend in a DA figure

2010-09-24 Thread Dennis Murphy
Hi: It's a little hard to help on that front without a reproducible example but you could read the help page of plot.lda in the MASS package, where you would find that it takes both xlab and ylab arguments, and for which you can probably pass main as well since it contains a ... argument. Did you

Re: [R] Odds ratio from Logistic model in R

2010-09-24 Thread Joshua Wiley
Hi Guoya, Is this what you are after? # fit logistic model my.glm - glm(vs ~ mpg, data = mtcars, family = binomial(link = logit)) # look at a summary summary(my.glm) # view the coefficients as odds ratios exp(coef(my.glm)) Hope that helps, Josh On Fri, Sep 24, 2010 at 10:50 AM, Li, Guoya

Re: [R] Odds ratio from Logistic model in R

2010-09-24 Thread Jorge Ivan Velez
Hi Guoya, One more option, using Joshua's example, would be: # install.packages('epicalc') require(epicalc) logistic.display(my.glm) HTH, Jorge On Fri, Sep 24, 2010 at 1:50 PM, Li, Guoya wrote: Hi, I am new to R. Anyone can explain the following from R-help or anyone can direct me how to