[R] xyplot help

2008-07-22 Thread ae2356
I have a question about xyplot. Suppose I want to plot say a response variable y vs a predictor x within groups defined by a variable called z. And suppose I have another variable v=1,2 with two levels. I would use the following command to get a spaghetti plot with two panels defined by v.

Re: [R] Creation of png=problems

2008-07-22 Thread Prof Brian Ripley
1) As the posting guide asked, update your R. R 2.7.x has a new png() device that many people prefer. 2) As the INSTALL file points out, this is an installation issue discussed in the R-admin manual. JPEG and PNG support is optional (even on Windows, but someone compiled it in for you if

[R] Table orderd by frequencies

2008-07-22 Thread Kunzler, Andreas
Dear List, I try to order the output of a table by the frequencies of the vector I am look at. The object I am looking at is a factor with a lot of levels that were named only once. Therefore it would be much easier to order the output by the frequencies of the levels. E.g. levels(a) a b c d

Re: [R] how to speed up this for loop?

2008-07-22 Thread bartjoosen
I'm not sure if I understand correct, but maybe something like: apply(dat,2,function(x) sum(x[x0])) Please do read the posting guide and post a small, working example!!! Bart Rheannon wrote: Could anyone tell me a better way to achieve the output of this for loop? It seems to run quite

Re: [R] Table orderd by frequencies

2008-07-22 Thread Barry Rowlingson
2008/7/22 Kunzler, Andreas [EMAIL PROTECTED]: Dear List, I try to order the output of a table by the frequencies of the vector I am look at. The object I am looking at is a factor with a lot of levels that were named only once. Therefore it would be much easier to order the output by the

Re: [R] Table orderd by frequencies

2008-07-22 Thread Dimitris Rizopoulos
check the following: a - factor(sample(letters[1:4], 50, TRUE)) freqs - table(a) ind - order(freqs, decreasing = TRUE) # reorder the frequencies in the table freqs[ind] # reorder the levels of the factor levels(a) - names(freqs)[ind] table(a) I hope it helps. Best, Dimitris Dimitris

[R] Large number of dummy variables

2008-07-22 Thread Alan Spearot
Hello, I'm trying to run a regression predicting trade flows between importers and exporters. I wish to include both year-importer dummies and year-exporter dummies. The former includes 1378 levels, and the latter includes 1390 levels. I have roughly 100,000 total observations. When I'm using

[R] optimize function help!!

2008-07-22 Thread emir.toktar
Dear R users, I´m trying to optimize simultaneously two binomials inequalities used to acceptance sampling, which are nonlinear solution, so there is no simple direct solution. The 'n' represents the sample size and the 'c' an acceptance number or maximum number of defects (nonconforming) in

[R] how to speed up this for loop?

2008-07-22 Thread Rheannon
Could anyone tell me a better way to achieve the output of this for loop? It seems to run quite slow. I'm sure there must be a more consise way to sum from FN to LN, excluding positive values, for each row. #sum between FN and LN, excluding positive values for(i in 1:R){ for(j in FN[i]:LN[i]){

[R] Lattice: How to draw curves from given formulae

2008-07-22 Thread John Smith
Dear R Users: I have a list function as: Flat: y = 0 Linear: y = -(1.65/8)d Logistic: y = 0.015 - 1.73/{1+exp[1.2(4-d)]} Umbrella: y= -(1.65/3)d + (1.65/36)d^2 Emax: y = -1.81d/(0.79+d) Sigmoid Emax: y = -1.70d^5/(4^5+d^5) And want draw the figure as attached (those material are extracted from

[R] Accessing individual variables from summary of lm

2008-07-22 Thread ascentnet
I am trying to access the R2, intercept, and slope out of the summary from an lm so that I can insert it into a database using RODBC. How can I access these individually? thanks in advance, Ben. -- View this message in context:

[R] determing font type in expression

2008-07-22 Thread Thomas Hoffmann
Dear R-Maillist members, I would like to label the y-axis of a plot with a mathematical expression sed.rate mm a-1, where the -1 is printed subscript. I am using font.lab=15 for the x-axis. However, when plotting the y-axis with the expression-function it appears in a different font. Does

[R] Urgent

2008-07-22 Thread Yunlei.Hu
Hi everyone I try to use the solve.QP to solve the quadratic programming problem. But the Dmat in the funciotn is non-positive definite. Can anyone tell me which R function can deal with the quadratic programming with non positive definite Dmat matrix ( in solve.QP) I really appreaciated.

Re: [R] Reading SPSS .por files

2008-07-22 Thread Jose Iparraguirre D'Elia
Many thanks to you both, José -Original Message- From: Peter Dalgaard [mailto:[EMAIL PROTECTED] Sent: 18 July 2008 18:19 To: Jose Iparraguirre D'Elia Cc: Prof Brian Ripley; r-help@r-project.org Subject: Re: [R] Reading SPSS .por files Jose Iparraguirre D'Elia wrote: [snip] Thanks

Re: [R] xyplot help

2008-07-22 Thread Felix Andrews
v - factor(1:2) xyplot(1:2 ~ 1:2 | v, strip=strip.custom(strip.names=TRUE, sep==)) or v - shingle(1:2) xyplot(1:2 ~ 1:2 | v, strip=strip.custom(strip.levels=TRUE, sep==)) On Tue, Jul 22, 2008 at 4:26 PM, [EMAIL PROTECTED] wrote: I have a question about xyplot. Suppose I want to plot say

Re: [R] determing font type in expression

2008-07-22 Thread Prof Brian Ripley
On Tue, 22 Jul 2008, Thomas Hoffmann wrote: Dear R-Maillist members, I would like to label the y-axis of a plot with a mathematical expression sed.rate mm a-1, where the -1 is printed subscript. That's not a reproducible example. I am using font.lab=15 for the x-axis. However, when

[R] scatter plot using ggplot

2008-07-22 Thread Megh Dal
I used ggplot to create a scatter plot : library(ggplot) library(mnormt) Sigma = matrix(c(1, 0.6, 0.6, 1), 2, 2) x = rmnorm(20, c(0,0), Sigma) xx = x[order(x[,1]),] y = xx[,1] z = xx[,2] qplot(z, y, type=point, main=x-y plot, xlab=x, col=blue) However I want following: 1. Plot color must be

Re: [R] Accessing individual variables from summary of lm

2008-07-22 Thread Paul Smith
On Tue, Jul 22, 2008 at 5:44 AM, ascentnet [EMAIL PROTECTED] wrote: I am trying to access the R2, intercept, and slope out of the summary from an lm so that I can insert it into a database using RODBC. How can I access these individually? Try: data(swiss) model - lm(Infant.Mortality ~

[R] rpart$where and predict.rpart

2008-07-22 Thread Chua Siang Li
Hello there. I have fitted a rpart model. rpartModel - rpart(y~., data=data.frame(y=y,x=x),method=class, ) and can use rpart$where to find out the terminal nodes that each observations belongs. Now, I have a set of new data and used predict.rpart which seems to give

Re: [R] Parameter names in nls

2008-07-22 Thread rhelp . 20 . trevva
Kiaora Rolf, Thanks for the reply. The syntax that I am using is based on examples from ?optim, where a very similar system is setup with the rosenbrook banana function. Given that nls() is basically a wrapper for optim(), it seems reasonable that the logic should carry across. Furthermore, the

Re: [R] rpart$where and predict.rpart

2008-07-22 Thread Prof Brian Ripley
On Tue, 22 Jul 2008, Chua Siang Li wrote: Hello there. I have fitted a rpart model. rpartModel - rpart(y~., data=data.frame(y=y,x=x),method=class, ) and can use rpart$where to find out the terminal nodes that each observations belongs. Now, I have a set of new data and

Re: [R] y-axis number format on plot, barplot etc.

2008-07-22 Thread Henrique Dallazuanna
Try this: barplot(x, yaxt=n) axis(2, axTicks(2), format(axTicks(2), scientific = F)) On 7/21/08, Bill Cunliffe [EMAIL PROTECTED] wrote: I am trying to change the number format shown on the y-axis from scientific 5e05, to 500,000 etc. Does anyone know how to do this? Is there something I

Re: [R] alternate usage of soil.texture (plotrix)

2008-07-22 Thread Jim Lemon
On Mon, 2008-07-21 at 07:00 -0700, Dylan Beaudette wrote: Hi, I have used the soil.texture() function from the plotrix package many times and am very pleased that such a function exists in R. I have a slightly different need this time, and need some pointers on how to accomplish it. Instead of

[R] Odp: how to speed up this for loop?

2008-07-22 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 22.07.2008 01:24:05: Could anyone tell me a better way to achieve the output of this for loop? It seems to run quite slow. I'm sure there must be a more consise way to sum from FN to LN, excluding positive values, for each row. It is difficult to

[R] randomForest Tutorial

2008-07-22 Thread Dirk Nemitz
I am new to R and I'd like to use the randomForest package for my thesis (identifying important variables for more detailed analysis with other software). I have found extremely well written and helpful information on the usage of R. Unfortunately it seems to be very difficult to find similarly

[R] loop for multiple regressions

2008-07-22 Thread Denise Xifara
Dear all, I have the following data in excel: day1 y 1 2 3 2 3 x1 0.2 0.3 0.4 0.3 0.2 x2 7 3.4 2 8 6 day2 y 2 4 3 2 2 x1 0.4 0.5 0.3 0.3 0.2 x2 7 8 9.1 6 5 I have the following problems: first of all, when I ask R to read the file (with the package xlsReadWrite and the command read.xls)

[R] Opening files from R terminal - appologies

2008-07-22 Thread Williams, Robin
Dear all, I appologise for cluttering up the list with such a basic question, however I have been unable to find the answer I want (possibly through my poor usage of the R help system). As I am visually impaired and using assistive technology, I think I would prefer to use R from the terminal

Re: [R] randomForest Tutorial

2008-07-22 Thread Jim Porzak
Dirk, Check out Andy Liaw/Mat Wiener's article in RNews 2002-3 www.r-project.org/doc/Rnews/Rnews_2002-3.pdf Also my decks at www.porzak.com/JimArchive : 1. http://www.porzak.com/JimArchive/JimPorzak_CIwithR_useR2006_tutorial.pdf 2nd part is on randomForest 2.

[R] Ignore previous emails

2008-07-22 Thread Williams, Robin
Please ignore my previous message, I have solved the problem by altering the filename. I appologise for cluttering this already-busy list. Robin Williams Met Office summer intern - Health Forecasting [EMAIL PROTECTED] [[alternative HTML version deleted]]

Re: [R] Opening files from R terminal - appologies

2008-07-22 Thread Sarah Goslee
Hi Robin, read.table() is the general import function, and read.csv() and read.csv2() are very similar but have different defaults. For learning the ins and outs of R, the keyword help search is very useful: help.search(csv) would have sent you to read.table for data input. There are also some

[R] saving plot both as jpg and pdf

2008-07-22 Thread Monica Pisica
Hi, I want to save a plot automatically as a pdf and jpg, and if I open the pdf device first and jpeg second only the jpeg file saves correctly …. If I do reverse, only the pdf file saves correctly. pdf('E:/my_graphs/test1.pdf', bg = white) jpeg('E:/my_graphs/test1.jpg', quality = 100, bg =

[R] normalised/transformed regressions

2008-07-22 Thread tolga . i . uzuner
Dear R Users, Are there any packages in R which carries out a normalisation to variables as follows: - find the empirical distribution function, using perhaps ecdf - use the empirical distribution function to transform the variables into a series between 0 and 1 - use this series to map the

Re: [R] Opening files from R terminal - appologies

2008-07-22 Thread Gabor Grothendieck
Maybe the spelling is slightly differently than you think. List all filenames ending in csv: dir(patt = csv$) If there is only one then: fn - dir(patt = csv$) read.csv(fn) or if there are many and its the second read.csv(fn[2]) On Tue, Jul 22, 2008 at 9:24 AM, Williams, Robin [EMAIL

[R] Error in installing packages

2008-07-22 Thread Lazarus Mramba
Dear R Users; I am an R user who has recently bought a new laptop;Toshiba Satellite U405 running on both Windows Vista and Ubuntu. I have problems on the wondows vista when installing packages. The argument 'lib' is missing. How do i solve this problem? Illustration:

[R] How to filter a data frame?

2008-07-22 Thread rlearner309
I have a question about how to filter the data frame: Suppose my data frame has variables like gender, age,... How to get a subset of the data frame, with only female (or male) and/or age 50...? What is the typical syntax? I tried several condition expressions, but none of them worked...

Re: [R] Opening files from R terminal - appologies

2008-07-22 Thread Rossouw, Ruan (RF)
Hi Robin, Look at ?read.csv and ?read.table Regards, Ruan Ruan Rossouw Sasol Technology RD Reaction Technology and Industrial Statistics Tel: +27 16 960 4717

Re: [R] How to filter a data frame?

2008-07-22 Thread John Kane
?subset Is this what you want? subset(dataset, gender=M | age 50) --- On Tue, 7/22/08, rlearner309 [EMAIL PROTECTED] wrote: From: rlearner309 [EMAIL PROTECTED] Subject: [R] How to filter a data frame? To: r-help@r-project.org Received: Tuesday, July 22, 2008, 9:47 AM I have a

Re: [R] How to filter a data frame?

2008-07-22 Thread Marc Schwartz
on 07/22/2008 08:47 AM rlearner309 wrote: I have a question about how to filter the data frame: Suppose my data frame has variables like gender, age,... How to get a subset of the data frame, with only female (or male) and/or age 50...? What is the typical syntax? I tried several condition

Re: [R] Opening files from R terminal - appologies

2008-07-22 Thread Prof Brian Ripley
What I suggest you do is 1) Put the R bin directory in your path. 2) cd to your working directory, and start Rterm.exe from there. 3) Then dat - read.csv(InitialDataAnalysis.csv) should work. Note, there is no 'read.file', and of the many read.* functions you want to read a .csv file so it

Re: [R] How to filter a data frame?

2008-07-22 Thread Peter Dalgaard
John Kane wrote: ?subset Is this what you want? subset(dataset, gender=M | age 50) In case you didn't see it: Make that gender == M | age 50 -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*)

Re: [R] Coefficients of Logistic Regression from bootstrap - how to get them?

2008-07-22 Thread Michal Figurski
Dear all, I don't want to argue with anybody about words or about what bootstrap is suitable for - I know too little for that. All I need is help to get the *equation coefficients* optimized by bootstrap - either by one of the functions or by simple median. Please help, -- Michal J.

Re: [R] Error in installing packages

2008-07-22 Thread Ben Bolker
Lazarus Mramba LMramba at kilifi.kemri-wellcome.org writes: Dear R Users; I am an R user who has recently bought a new laptop;Toshiba Satellite U405 running on both Windows Vista and Ubuntu. I have problems on the wondows vista when installing packages. The argument 'lib' is missing.

Re: [R] Large number of dummy variables

2008-07-22 Thread Martin Maechler
HaroldD == Doran, Harold [EMAIL PROTECTED] on Mon, 21 Jul 2008 19:15:37 -0400 writes: HaroldD Well, yes and no. In R there really isn't a need to create the model matrix because this is done in R from the factors. But, to implement this computational trick Alan is asking about, it

Re: [R] Coefficients of Logistic Regression from bootstrap - how to get them?

2008-07-22 Thread Doran, Harold
I think the answer has been given to you. If you want to continue to ignore that advice and use bootstrap for point estimates rather than the properties of those estimates (which is what bootstrap is for) then you are on your own. -Original Message- From: [EMAIL PROTECTED]

Re: [R] How to filter a data frame?

2008-07-22 Thread milton ruser
May be this help you; Just intall.packages(sqldf, dependencies=T) require(sqldf) my_df-data.frame(cbind(gender=sample(c(male,female),50,replace=T), age=round(rnorm(50, mean=30, sd=5),0))) my_df_subset_male-sqldf(select * from my_df where gender=='male') my_df_subset_male

Re: [R] Parameter names in nls

2008-07-22 Thread Ben Bolker
rhelp.20.trevva at spamgourmet.com writes: Kiaora Rolf, Thanks for the reply. The syntax that I am using is based on examples from ?optim, where a very similar system is setup with the rosenbrook banana function. Given that nls() is basically a wrapper for optim(), it seems reasonable

Re: [R] Error in installing packages

2008-07-22 Thread Richard Pearson
Lazarus I'm not sure your first problem is actually a problem - it looks to me like the epicalc package installed OK. Have you tried using epicalc? I'm sure your problem 2 is not an R problem, so don't know whether you'll get any help on this list. Best wishes Richard. Lazarus Mramba

Re: [R] Error in installing packages

2008-07-22 Thread Gabor Grothendieck
If the warning bothers you then look at: .libPaths() and if you want to install to the second library, say, then do: install.packages(some.package, lib = .libPaths()[2]) Regarding your Ubuntu problem, another possibility is to try AndLinux which is a coLinux-based Ubuntu system that sits right

[R] Does R have SQL interface in windows?

2008-07-22 Thread rlearner309
Seems that the RmySQL package does not support windows... Thanks a lot! -- View this message in context: http://www.nabble.com/Does-R-have-SQL-interface-in-windows--tp18587733p18587733.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Coefficients of Logistic Regression from bootstrap - how to get them?

2008-07-22 Thread Michal Figurski
Hmm... It sounds like ideology to me. I was asking for technical help. I know what I want to do, just don't know how to do it in R. I'll go back to SAS then. Thank you. -- Michal J. Figurski Doran, Harold wrote: I think the answer has been given to you. If you want to continue to ignore

Re: [R] Coefficients of Logistic Regression from bootstrap - how to get them?

2008-07-22 Thread Doran, Harold
Probably a good idea for you. The R help list is useful for both programming AND statistical advice for those who want it. -Original Message- From: Michal Figurski [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 22, 2008 10:44 AM To: Doran, Harold; r-help@r-project.org Subject: Re:

Re: [R] saving plot both as jpg and pdf

2008-07-22 Thread stephen sefick
you have to go in sequence- you are opening a pdf device then a jpeg device and ploting to the jpeg device. My suggestion would be to do pdf() plot(yourplot) dev.off() jpeg plot(yourplot) dev.off() this should work On Tue, Jul 22, 2008 at 9:50 AM, Monica Pisica [EMAIL PROTECTED] wrote: Hi,

Re: [R] saving plot both as jpg and pdf

2008-07-22 Thread Monica Pisica
Hi, Thank you both for the suggestions it seems i have to send the plot twice since i cannot have 2 devices active in the same time . I Knew about savePlot but this saves jpf only at 72 dpi and i wanted a better resolution for jpg files. I will look into dev.copy2pdf, maybe i can

Re: [R] Coefficients of Logistic Regression from bootstrap - how to get them?

2008-07-22 Thread N. Lapidus
Hi Michal, This paper by John Fox may help you to precise what you are looking for and to perform your analyses http://cran.r-project.org/doc/contrib/Fox-Companion/appendix-bootstrapping.pdf Nael On Tue, Jul 22, 2008 at 3:51 PM, Michal Figurski [EMAIL PROTECTED] wrote: Dear all, I don't want

Re: [R] Coefficients of Logistic Regression from bootstrap - how to get them?

2008-07-22 Thread Bert Gunter
The bootstrap **can** be used for bias correction. However, it may not be such a good thing to do. I quote from Efron and Tibshirani's AN INTRODUCTION TO THE BOOTSTRAP (p.138): ... bias estimation is usually interesting and worthwhile, but the exact use of a bias estimate is often problematic.

Re: [R] How to filter a data frame?

2008-07-22 Thread Roland Rau
Hi, rlearner309 wrote: I have a question about how to filter the data frame: Suppose my data frame has variables like gender, age,... How to get a subset of the data frame, with only female (or male) and/or age 50...? What is the typical syntax? I tried several condition expressions, but

Re: [R] saving plot both as jpg and pdf

2008-07-22 Thread Greg Snow
Plotting functions only send the plot to the current device (in your case the 2nd one opened). You can see all the currently open devices with dev.list, you can see which is current with dev.cur, you can change which is current using dev.set (and possibly dev.next and dev.prev). Look at the

Re: [R] saving plot both as jpg and pdf

2008-07-22 Thread Tomas Lanczos
Just an advice: I recommend use the png device instead of jpeg for plotting purposes, it gives better results for graphs. Jpeg is better for photos. Off course IMHO :-) I wish a nice day Tomas stephen sefick wrote: you have to go in sequence- you are opening a pdf device then a jpeg device

Re: [R] normalised/transformed regressions

2008-07-22 Thread Greg Snow
It is possible to write a function to do what you describe, but the real question is why would you want to do that? It looks like you are trying to force your data to fit a set of assumptions that are not needed. The normality assumption in regression models is that the residuals are normal,

Re: [R] Does R have SQL interface in windows?

2008-07-22 Thread Gabor Grothendieck
Its hard to tell from your post why you believe it is not supported by Windows. Please read the posting guide prior to posting. Some possible problemsyou may have: - spelling is RMySQL, not RmySQL as in your post - maybe you simply have not found the binary? Set your mirror to the CRAN

[R] S4 : setGeneric for classical methods

2008-07-22 Thread cgenolin
Hi the list (well, half of the list, only the one who are not on holidays...) I am trying to make an S4 package. When I run it on a console, everything seems ok. When I run R CMD check, I got an error --- 8 -- Error in setMethod(plot, ClassX, function(x, y) { : no existing

[R] data transformation

2008-07-22 Thread Christian Hof
Dear all, how can I, with R, transform a presence-only table (with the names of the species (1st column), the lat information of the sites (2nd column) and the lon information of the sites (3rd column)) into a presence-absence (0/1) matrix of species occurrences across sites, as given in the

Re: [R] how to speed up this for loop?

2008-07-22 Thread Rheannon
Here is the full code: R - 5328 #Temp is a temperature file with daily temp. values for each day of the year, for 5328 locations Temp - rnorm(100) dim(Temp) - c(365,5328) # transpose temp dataframe in order to perform rollmean (running mean) on proper data section Temp_T - t(Temp) library(zoo)

Re: [R] scatter plot using ggplot

2008-07-22 Thread hadley wickham
On Tue, Jul 22, 2008 at 3:42 AM, Megh Dal [EMAIL PROTECTED] wrote: I used ggplot to create a scatter plot : library(ggplot) library(mnormt) Sigma = matrix(c(1, 0.6, 0.6, 1), 2, 2) x = rmnorm(20, c(0,0), Sigma) xx = x[order(x[,1]),] y = xx[,1] z = xx[,2] qplot(z, y, type=point, main=x-y

[R] tklistbox and extracting selection to R

2008-07-22 Thread Judith Flores
Dear experts, I am trying to understand why is it that when I paste (into the R console) the following code to select an option from a list: require(tcltk) tt-tktoplevel() tl-tklistbox(tt,height=ntx,selectmode=single,background=white) tkgrid(tklabel(tt,text=Select the legend of ))

Re: [R] normalised/transformed regressions

2008-07-22 Thread tolga . i . uzuner
Hi Greg, First of all, many thanks for your detailed response. I was trying to achieve robustness in the regressions without making any assumptions about any transformations that might be needed, as I have no prior apart from realised. This seemed like a neat way of doing it, but there may be

Re: [R] S4 : setGeneric for classical methods

2008-07-22 Thread Prof Brian Ripley
On Tue, 22 Jul 2008, [EMAIL PROTECTED] wrote: Hi the list (well, half of the list, only the one who are not on holidays...) I am trying to make an S4 package. When I run it on a console, everything seems ok. When I run R CMD check, I got an error --- 8 -- Error in

Re: [R] normalised/transformed regressions

2008-07-22 Thread Greg Snow
There is a whole taskview on CRAN devoted to robust statistics (including variants of regression), I would suggest you look through that to see if any of those tools work for you. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111

Re: [R] normalised/transformed regressions

2008-07-22 Thread tolga . i . uzuner
Many thanks, let me find that, Tolga Greg Snow [EMAIL PROTECTED] 22/07/2008 18:01 To [EMAIL PROTECTED] [EMAIL PROTECTED] cc r-help@r-project.org r-help@r-project.org Subject RE: [R] normalised/transformed regressions There is a whole taskview on CRAN devoted to robust statistics

Re: [R] S4 : setGeneric for classical methods

2008-07-22 Thread cgenolin
Prof Brian Ripley [EMAIL PROTECTED] a écrit : On Tue, 22 Jul 2008, [EMAIL PROTECTED] wrote: Hi the list (well, half of the list, only the one who are not on holidays...) I am trying to make an S4 package. When I run it on a console, everything seems ok. When I run R CMD check, I got an

Re: [R] Lattice: How to draw curves from given formulae

2008-07-22 Thread Deepayan Sarkar
On 7/21/08, John Smith [EMAIL PROTECTED] wrote: Dear R Users: I have a list function as: Flat: y = 0 Linear: y = -(1.65/8)d Logistic: y = 0.015 - 1.73/{1+exp[1.2(4-d)]} Umbrella: y= -(1.65/3)d + (1.65/36)d^2 Emax: y = -1.81d/(0.79+d) Sigmoid Emax: y = -1.70d^5/(4^5+d^5) And

Re: [R] tklistbox and extracting selection to R

2008-07-22 Thread Greg Snow
The - assignment can be very tricky and Tk windows have their own world. If you just copy and paste the below (with ntx and levels.tx defined, it would have been nice to have the example fully self running), then the OnOk function has been defined and linked to the button, but never run, so

Re: [R] Change font-face in title

2008-07-22 Thread Mike Prager
Gabor Grothendieck [EMAIL PROTECTED] wrote: plot(1, type=l, xlab=Wellenlänge [nm], col=darkslategray, main = ~ Spektrum ~ italic(Deschampsia caespitosa)) That clearly works, but why? Does the tilde cause the rest of the text to be parsed as an expression? This looks extremely useful,

Re: [R] drawing segments through points with pch=1

2008-07-22 Thread Mike Prager
David Epstein [EMAIL PROTECTED] wrote: Please excuse me for asking such basic questions: Here is my code y=c(1.21,0.51,0.14,1.62,-0.8,0.72,-1.71,0.84,0.02,-0.12) ybar=mean(y) ll=length(y); ybarv=rep(ybar,ll) x=1:ll plot(x,ybarv,pch=1) segments(x[1],ybar,x[ll],ybar) What I get

[R] 2 Courses*** R/Splus Advanced Programming : August 14-15 in Seattle ! by XLSolutions Corp

2008-07-22 Thread [EMAIL PROTECTED]
XLSolutions Corporation (www.xlsolutions-corp.com) is proud to announce our*** R/S Advanced Programming ***course in Seattle on August 14-15 and *** R/Splus Fundamentals and Programming Techniques*** course in New York City on July 28-29 Ask for group discount and reserve your seat Now -

Re: [R] Does R have SQL interface in windows?

2008-07-22 Thread Prof Brian Ripley
On Tue, 22 Jul 2008, rlearner309 wrote: Seems that the RmySQL package does not support windows... Not so (there is even a binary on CRANextras, but read the README), and RODBC does as well. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics,

Re: [R] randomForest Tutorial

2008-07-22 Thread Hans W. Borchers
The help pages for 'randomForest' are quite clear in stating how to use the 'randomForest()' function. Input is a data frame (not a csv-file) and a formula involving attribute names. There is a kind of tutorial for classification and clustering with Random Forests on Leo Breiman's web page

Re: [R] Coefficients of Logistic Regression from bootstrap - how to get them?

2008-07-22 Thread Marc Schwartz
Michal, With all due respect, you have openly acknowledged that you don't know enough about the subject at hand. If that is the case, on what basis are you in a position to challenge the collective wisdom of those professionals who have voluntarily offered *expert* level statistical advice

Re: [R] data transformation

2008-07-22 Thread Marc Schwartz
on 07/22/2008 11:24 AM Christian Hof wrote: Dear all, how can I, with R, transform a presence-only table (with the names of the species (1st column), the lat information of the sites (2nd column) and the lon information of the sites (3rd column)) into a presence-absence (0/1) matrix of

Re: [R] how to speed up this for loop?

2008-07-22 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rheannon Sent: Tuesday, July 22, 2008 9:09 AM To: r-help@r-project.org Subject: Re: [R] how to speed up this for loop? Here is the full code: R - 5328 #Temp is a temperature file with daily

[R] Help with rearranging data

2008-07-22 Thread William Pepe
In Excel, I have data that looks like this. Month Seg Prod Biller Cycle Sales 1/1/2008 A Table Phyllis 1 500 1/1/2008 A Table Phyllis 2 600 1/1/2008 A Table Phyllis 3 650 1/1/2008 A Table Doreen 1 345 1/1/2008 A Table Doreen 2 451 1/1/2008 A Table Doreen 6 550 1/1/2008 A Table Doreen

[R] Editor for Mac

2008-07-22 Thread Angelo Scozzarella
Thanks for the answers, but I'm looking for an editor like Tinn-R. Is there something like it for Mac? Angelo Scozzarella __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Coefficients of Logistic Regression from bootstrap - how to get them?

2008-07-22 Thread Doran, Harold
install.packages('fortunes') library(fortunes) fortune(28) -Original Message- From: Marc Schwartz [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 22, 2008 1:29 PM To: Michal Figurski Cc: Doran, Harold; r-help@r-project.org; Frank E Harrell Jr; Bert Gunter Subject: Re: [R]

Re: [R] Help with rearranging data

2008-07-22 Thread jim holtman
Here is a start that will get you a dataframe. You will have to decide how you want to convert the long to wide format since that did not clearly come through in the mail: x - readLines('/tempxx.txt') # remove blank lines x - x[x != ] # create matrix y - matrix(x[-(1:6)], ncol=6,

Re: [R] Lattice: How to draw curves from given formulae

2008-07-22 Thread John Smith
Thanks, Deepayan, I actually want to have a picture like the Figure 5.9 in Mixed-Effects Models in S and S-PLUS, which have a separate panel for each function and has the function name been printed in strip. Thanks On Tue, Jul 22, 2008 at 1:08 PM, Deepayan Sarkar [EMAIL PROTECTED] wrote: On

[R] Function Error

2008-07-22 Thread Angelo Scozzarella
Hi, Why this function doesn't work? function (x) { if (is.factor(x)) { if (!is.ordered(x)) { warning(La mediana non si puo' calcolare!!!) return(NA) } me - median(unclass(x)) if (me - floor(me) != 0) { warning(Mediana

[R] How to simulate heteroscedasticity (correlation)

2008-07-22 Thread Jörg Groß
Hi, I would like to generate two correlated variables. I found that funktion for doing that: a - rmvnorm(n=1,mean=c(20,20),sigma=matrix(c(5,0.8*sqrt(50), 0.8*sqrt(50),10),2,2)) (using library(mvtnorm)) Now I also want to generate two correlated variables where the error variance vary

Re: [R] Help with rearranging data

2008-07-22 Thread Henrik Bengtsson
Hi, is your question how you do this in R? Note that this is a mailing list for R. There are probably other lists/groups better suited for Excel-specific problems. Cheers Henrik On Tue, Jul 22, 2008 at 10:59 AM, William Pepe [EMAIL PROTECTED] wrote: In Excel, I have data that looks like

Re: [R] Help with rearranging data

2008-07-22 Thread William Pepe
Yes, my apologies, I want to do this in R. Date: Tue, 22 Jul 2008 11:33:01 -0700 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: r-help@r-project.org Subject: Re: [R] Help with rearranging data Hi, is your question how you do this in R? Note that this is a mailing list for R. There

Re: [R] Calculating Betweenness - Efficiency problem

2008-07-22 Thread Senthil Purushothaman
Dear Gabor, Thank you very much for the insights. I have been using the igraph package for my computations. But I did not know about graph.data.frame(). Thanks again for that. So I did run my data using the steps you had provided. Weirdly, even though the .csv file has approximately 300,000

Re: [R] Coefficients of Logistic Regression from bootstrap - how to get them?

2008-07-22 Thread Michal Figurski
Dear Marc and all, Thank you for all the due respect. I tried to explain as much explicitly as I could what I am trying to do in my first email. I did not invent this procedure, it was already published in the paper: T. Pawinski, M. Hale, M. Korecka, W.E. Fitzsimmons, L.M. Shaw. Limited

[R] rollmean and stl

2008-07-22 Thread stephen sefick
I need to investigate how rollmean and the trend returned from stl differ. I am trying to find out exactly what the trend part of stl is (I have just started coding in R and do not know fortran). I need to extract this because it will be used in further calculations, and it needs to be verified

[R] help with simulate AR(1) data

2008-07-22 Thread cathelf
Hi, sorry for bothering your guys again. I want to simulate 100 AR(1) data with cor(x_t, x_t-1)=rho=0.3. The mean of the first 70 data (x_1 to x_70) is 0 and the mean of the last 30 data (x_71 to x_100) is 2. Can I do it in the following way? x - arima.sim(list=(ar=0.3), 100) mean - c(rep(0,

[R] help on R benchmarks

2008-07-22 Thread Jiangtian Li
Hi, All, I am just wondering if I can find some R benchmarks that has mixed loop and function calls and both are computation expensive? I searched the R packages but could not find a statisfactory one since the examples provide small sample input data and the run time is short. A benchmark that

Re: [R] Function Error

2008-07-22 Thread Erik Iverson
Please give commented, minimal, self-contained, reproducible code. In this case, not only the function definition, but a simple example showing *how* it does not work, and what you were expecting it to do! Angelo Scozzarella wrote: Hi, Why this function doesn't work? function (x) { if

Re: [R] Function Error

2008-07-22 Thread anna freni sterrantino
Hi Angelo, please read the posting guide, before posting! Anyway, for general rule, if you want to see what's going on in a function at each step, it may be helpful to install library(debug) that has very useful functions as mtrace that my resolve your problem. Cheers Anna -

Re: [R] how to speed up this for loop?

2008-07-22 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nordlund, Dan (DSHS/RDA) Sent: Tuesday, July 22, 2008 10:31 AM To: r-help@r-project.org Subject: Re: [R] how to speed up this for loop? -Original Message- From: [EMAIL PROTECTED]

[R] .asp (not really an R question) but related

2008-07-22 Thread stephen sefick
I am trying to get the paper that explains the stl procedure it is a .asp file. What can I use to read this. thanks stephen -- Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We

Re: [R] Function Error

2008-07-22 Thread Sarah Goslee
At a first guess, because you are missing a right paren in thereturn() statement of the final else section. Otherwise, we'd need to know about what doesn't work means - what is x supposed to be? What do you want the function to do? What error messages are you getting? You haven't provided any of

[R] Reading the data from specific columns

2008-07-22 Thread Vidhu Choudhary
Hi All, I have a huge tab separated file which a many columns. I want to read only few specific columns in R object. There are no column names/headers in the file. Can someone please suggest how can I do that. I checked the help of read.delim but wasnt able to find such option Thank you Reagards

  1   2   >