Re: [R] How do I run to or more R consoles on Mac OS X?

2009-11-30 Thread Ken Knoblauch
chronos.phenomena chronos.phenomena at gmail.com writes: This is really annoying me... when I click R application icon it brings already opened session in the focus and it DOESN'T open new session any ideas? In Leopard from a terminal, you can try open -n /Applications/R.app to

Re: [R] Learning R

2009-11-30 Thread Paul Hiemstra
Hi Julia, I would really recommend reading a book on R. A good option might by the Introductory statistics with R by Peter Dalgaard, or the MASS (Modern Applied Statistics with S) book. The advantage of a book is that it presents a coherent overview, saving you time to wade through the

Re: [R] sequence of commands in R

2009-11-30 Thread Paul Hiemstra
Manuel Jesús López Rodríguez wrote: Dear all, I would like to know how could I execute a sequence or orders with just a function, i.e, that just typing the function name, R gives me all the parameters I want (for instance, if I want to see the summary, the standard deviation, the number of

Re: [R] kernlab's ksvm method freeze

2009-11-30 Thread Uwe Ligges
My apologies, that must have been a copypaste error and the essential argument got lost. I can reproduce it now under R-2.10.0 both Windows and Linux. Please report your findings to the package maintainer who might be able to debug this under Linux (probably easier than under Windows).

Re: [R] kernlab's ksvm method freeze

2009-11-30 Thread Heiko Strathmann
Ok, i reported it. thanks for trying it out again. Am 30. November 2009 11:06 schrieb Uwe Ligges lig...@statistik.tu-dortmund.de: My apologies, that must have been a copypaste error and the essential argument got lost. I can reproduce it now under R-2.10.0 both Windows and Linux. Please

[R] Histogram and Density on the the same graph

2009-11-30 Thread Trafim
Dear all, I cannot find a function which would allow drawing hist and density on the same graph. x - seq(1,40,1) y - 2*x+1+5*rnorm(length(x)) hist(y,freq = FALSE) plot(density(y)) thanks a lot for the help [[alternative HTML version deleted]]

[R] [R-pkgs] NMF package for Nonnegative Matrix Factorization

2009-11-30 Thread Renaud Gaujoux
The 'NMF' package implements a number of standard algorithms to perform Nonnegative Matrix Factorization. It also provides a flexible framework to easily test and develop new methods, as well as a layer to work with Bioconductor objects. The package is available from CRAN. Feedbacks are

[R] Saving interactive modified latttice plots?

2009-11-30 Thread Derek Eder
The lattice function panel.identify() allows the labeling of mouse-selected plot points. But ... how does one save the resulting plot? E.g., to png() or pdf() Thank you! # example code library(lattice) xyplot(rnorm(10,0,1)~rnorm(10,0,1)) trellis.focus() # left click on plot panel to select

Re: [R] Histogram and Density on the the same graph

2009-11-30 Thread Ted Harding
On 30-Nov-09 11:09:12, Trafim wrote: Dear all, I cannot find a function which would allow drawing hist and density on the same graph. x - seq(1,40,1) y - 2*x+1+5*rnorm(length(x)) hist(y,freq = FALSE) plot(density(y)) thanks a lot for the help plot() initiates a completely new plot,

[R] Bartlett' test

2009-11-30 Thread Silvano
Hi, I have an experiment with 5 treatments, of which 2 with 10 repetitions and 2 with 7 replications. I conducted the test of Bartlett step-by-step and compared with the value calculated directly by the R and the values are different. Anyone know tell me why? #--- n =

[R] multiple comparisons with non homogeneus variances

2009-11-30 Thread G. Allegri
This is a mixed question, between theory and practice. I have a dataset with a continous variable grouped by a 33 levels factor. After having log-tranformed my original data I can assume the normality of my data but I have two strong departures from the basic assumptions for anova and t tests:

Re: [R] multiple comparisons with non homogeneus variances

2009-11-30 Thread G. Allegri
I've forgot to cite the Games and Howell procedure, which some literature (eg in Pairwise Multiple Comparison Procedures: A Review [1]) referes as a good one for uneual samples and non homogeneus variance. Yet I haven't found an implementation for R... giovanni [1]

Re: [R] Learning R

2009-11-30 Thread Hrishi Mittal
These are some good resources for learning R: Quick-R - http://www.statmethods.net/ From Data to Graphics - http://zoonek2.free.fr/UNIX/48_R/03.html UCLA Resources to help you learn and use R - http://www.ats.ucla.edu/stat/r/ Good luck! -- View this message in context:

Re: [R] Little help needed

2009-11-30 Thread stephen sefick
We don't do homework. On Sun, Nov 29, 2009 at 11:21 PM, dovii dovii...@yahoo.com wrote: So, I need some serious help with an R project.  The project essentially consists of some problems that have to be analyzed to decide the correct statistical test to use, and then correctly use R to answer

Re: [R] Learning R

2009-11-30 Thread Esmail
Julia Cains wrote: Dear R helpers, Almost 15 days back I have become member of this very active and wonderful group. So far I have been only raising queries and in turn got them solved too and I really thank for the spirit this group member show when it comes to the guidance. I wish to

[R] regression with a*cos(angle+phi)+b

2009-11-30 Thread Markus Häge
Hello, the only thing I found to fit a sin/cos is s.th like lm(a~cos+sin) But this is not what I want. I have a magnitude which is sinusoidal with offset and it doesn't start at phi=0. The data is: angle-c(0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180) Voltage-c(-45.07,

Re: [R] Histogram and Density on the the same graph

2009-11-30 Thread Trafim
Thanks a lot Ted! I use R help but also cannot find how to expand the graph, i.e. sometimes the top of it is cut for some reason. Maybe there are some limits imposed on y axes, but cannot find it. On Mon, Nov 30, 2009 at 12:27 PM, Ted Harding ted.hard...@manchester.ac.ukwrote: On 30-Nov-09

Re: [R] regression with a*cos(angle+phi)+b

2009-11-30 Thread Jorge Ivan Velez
Good morning Markus, Perhaps ?nls might be useful in this case. HTH, Jorge On Mon, Nov 30, 2009 at 7:19 AM, Markus Häge wrote: Hello, the only thing I found to fit a sin/cos is s.th like lm(a~cos+sin) But this is not what I want. I have a magnitude which is sinusoidal with offset and it

Re: [R] Histogram and Density on the the same graph

2009-11-30 Thread Hrishi Mittal
Trafim, If you are plotting more than one variables on the same plot e.g. by using the lines() or points() function, then the limits of the X and Y axes are set based on the first variable you plot. So, you would have to set the xlim and ylim to the limits of the variable with the widest range,

[R] Problem with Jri (rJava)

2009-11-30 Thread Javier Gil-Quijano
Hello, I am a newbie using the JRI java interface to R. Actually I have just tried to use the examples provided in the rJava distribution. Well, I have a problem when loading the jri native library (see bellow), indeed I have tried both to compile the library and to use the pre-compiled

Re: [R] Histogram and Density on the the same graph

2009-11-30 Thread Rainer M Krug
Chek the topic Second y-axis --- alternative to par(new= which was discussed recently - in that one, there are a few examples, how that can be achieved. Essentially, you have to make sure, that the xlims of the hist() and plot(density()) are the same, and you have to use the par(new=TRUE) (or

Re: [R] Histogram and Density on the the same graph

2009-11-30 Thread Trafim
I plot only hist(y,freq = FALSE) lines(density(y)) and the graph of density goes higher then hist, but i didn't find any lim parameter for y axes for lines command. Thanks a lot On Mon, Nov 30, 2009 at 1:51 PM, Hrishi Mittal hrishimit...@gmail.comwrote: Trafim, If you are plotting more

Re: [R] Problem with Jri (rJava)

2009-11-30 Thread Romain Francois
Hi, You probably want to use this mailing list instead : http://mailman.rz.uni-augsburg.de/mailman/listinfo/stats-rosuda-devel Romain On 11/30/2009 02:04 PM, Javier Gil-Quijano wrote: Hello, I am a newbie using the JRI java interface to R. Actually I have just tried to use the examples

Re: [R] regression with a*cos(angle+phi)+b

2009-11-30 Thread Peter Dalgaard
Jorge Ivan Velez wrote: Good morning Markus, Perhaps ?nls might be useful in this case. Or consult a compendium and realize that both formulas actually fit the same class of shifted sinusoidals... It holds that cos(v+phi) = cos phi cos v - sin phi sin v so you can fairly easily find A and

[R] Changes in Predicted Probabilities for multinomial regression as in STATA software

2009-11-30 Thread eugen pircalabelu
Hi R-users, I can not replicate the result for marginal effects from multinomial logistic regression stata output below (http://www.ats.ucla.edu/stat/stata/Library/longutil.htm) The dataset can be found here http://www.ats.ucla.edu/stat/stata/webbooks/logistic/hsblog.dta PART OF STATA OUTPUT

Re: [R] Bartlett' test

2009-11-30 Thread Peter Dalgaard
Silvano wrote: Hi, I have an experiment with 5 treatments, of which 2 with 10 repetitions and 2 with 7 replications. I conducted the test of Bartlett step-by-step and compared with the value calculated directly by the R and the values are different. Anyone know tell me why? The first term

[R] Joint density approximation?

2009-11-30 Thread Trafim
Hi everybody, I am looking for the possibility in R to estimate joint density, just for example: x - seq(1,40,1) y - 2*x+1+5*rnorm(length(x)) y1 - x^3+.5*rnorm(length(x)) Is there a way to approximate the density function s.t. I will later be able to calculate f(Y=y, Y1=y1) Thanks a lot

[R] multiple column argument in formula (MASS:lda)

2009-11-30 Thread marcos carvajalino
Dear R Help team, I'm having some problems running a discriminant analysis (MASS:lda) over my data, i have a grouping variable coming from a previous cluster analysis and several discriminators (78 actually). I'm trying to run lda using column index as independent variable in the formula like

Re: [R] Joint density approximation?

2009-11-30 Thread Trafim
Seems that I found it - kde2d On Mon, Nov 30, 2009 at 2:36 PM, Trafim rdapam...@gmail.com wrote: Hi everybody, I am looking for the possibility in R to estimate joint density, just for example: x - seq(1,40,1) y - 2*x+1+5*rnorm(length(x)) y1 - x^3+.5*rnorm(length(x)) Is there a way to

Re: [R] Histogram and Density on the the same graph

2009-11-30 Thread Ted Harding
Trafim, If you are plotting more than one variables on the same plot e.g. by using the lines() or points() function, then the limits of the X and Y axes are set based on the first variable you plot. So, you would have to set the xlim and ylim to the limits of the variable with the widest

[R] Ubuntu tcl/tk problems

2009-11-30 Thread stephen sefick
Error in firstlib(which.lib.loc, package) : Tcl/Tk support is not available on this system Error : package 'tcltk' could not be loaded Ubuntu 9.10 I have both the 8.5 and 8.4 tcl and tk regular and dev libraries installed. I need both of these because some of my GIS software requires the 8.4

Re: [R] Ubuntu tcl/tk problems

2009-11-30 Thread stephen sefick
I have installed apt-get build-dep r-base - also On Mon, Nov 30, 2009 at 7:58 AM, stephen sefick ssef...@gmail.com wrote: Error in firstlib(which.lib.loc, package) :  Tcl/Tk support is not available on this system Error : package 'tcltk' could not be loaded Ubuntu 9.10 I have both the 8.5

Re: [R] Ubuntu tcl/tk problems

2009-11-30 Thread Peter Dalgaard
stephen sefick wrote: Error in firstlib(which.lib.loc, package) : Tcl/Tk support is not available on this system Error : package 'tcltk' could not be loaded Ubuntu 9.10 I have both the 8.5 and 8.4 tcl and tk regular and dev libraries installed. I need both of these because some of my

Re: [R] Bartlett' test

2009-11-30 Thread Peter Ehlers
Silvano wrote: Hi, I have an experiment with 5 treatments, of which 2 with 10 repetitions and 2 with 7 replications. I conducted the test of Bartlett step-by-step and compared with the value calculated directly by the R and the values are different. Anyone know tell me why? Yes. Is

Re: [R] Joint density approximation?

2009-11-30 Thread Trafim
Unfortunately, it doesn't work. Can you, please, help me with it? Thanks a lot. On Mon, Nov 30, 2009 at 2:53 PM, Trafim rdapam...@gmail.com wrote: Seems that I found it - kde2d On Mon, Nov 30, 2009 at 2:36 PM, Trafim rdapam...@gmail.com wrote: Hi everybody, I am looking for the

[R] temporal replication

2009-11-30 Thread Rita
Can someone please help me with this I am trying to use this model because I have temporal replication in my data results-read.table(file=file.choose(),header=T) attach(results) names(results) results-na.omit(results) library(nlme) library(lattice)

[R] Problem with Jri (rJava)

2009-11-30 Thread Javier Gil-Quijano
Hello, I am a newbie using the JRI java interface to R. Actually I have just tried to use the examples provided in the rJava distribution. Well, I have a problem when loading the jri native library (see bellow), indeed I have tried both to compile the library and to use the pre-compiled

[R] Histogram and Density on the the same graph

2009-11-30 Thread Trafim
Dear all, I cannot find a function which would allow drawing hist and density on the same graph. x - seq(1,40,1) y - 2*x+1+5*rnorm(length(x)) hist(y,freq = FALSE) plot(density(y)) thanks a lot for the help [[alternative HTML version deleted]]

[R] Question about output from optim

2009-11-30 Thread Sébastien Bihorel
Thanks Ben for your reply, I would very much appreciate if you could share your code. That would be great! Sebastien PS: As suggested, I will forward this email to John Nash. Sébastien Bihorel pomchip at free.fr writes: * ** Dear R-users, ** ** I am trying to port to R something that I wrote

Re: [R] Histogram and Density on the the same graph

2009-11-30 Thread ONKELINX, Thierry
It's easy with the ggplot2 package set.seed(1234) dataset - data.frame(x = seq(1,40,1)) dataset$Response - with(dataset, 2*x+1+5*rnorm(length(x))) library(ggplot2) ggplot(dataset, aes(x = Response)) + geom_histogram(aes(y = ..density..)) + geom_density(colour = red) HTH, Thierry

[R] Using stepAIC to produce a p-value for when a particular variable was taken out of the model

2009-11-30 Thread Laura Bonnett
Dear all, I have decided after much deliberation to use backward elimination and forward selection to produce a multivariate model. Having read about the problems with choosing selection values I have chosen to base my decisions of inclusion and exclusion on the AIC and am consequently using the

Re: [R] Joint density approximation?

2009-11-30 Thread David Winsemius
On Nov 30, 2009, at 9:30 AM, Trafim wrote: Unfortunately, it doesn't work. Can you, please, help me with it? In order to support the notion of a 2 dimensional distribution, you need a function that depends on ... 2 dimensions. All you have at the moment are two different one-dimensional

Re: [R] how to put ggobi display into a GUI window setup by gWidgets

2009-11-30 Thread j verzani
jerry83 chaohan1983 at yahoo.com writes: Jerry, see below: Hi John, Thanks A LOT for your reply and the code. What I want to do is to include the ggobi display window to the widget window setup by me. I tried add before but it said can not do it for GGobiScatterplotDisplay. Do you have

Re: [R] Using stepAIC to produce a p-value for when a particular variable was taken out of the model

2009-11-30 Thread Laura Bonnett
I've just realised that this is a very silly post as I can't read!!! The output in the anova is the excluded variables - very sorry! Laura 2009/11/30 Laura Bonnett l.j.bonn...@googlemail.com Dear all, I have decided after much deliberation to use backward elimination and forward selection

[R] rpart: how to assign observations to nodes in regression trees

2009-11-30 Thread Diego Bellisai
Hi, I am building a regression tree (method=anova) by using rpart package and as a final result I get the final leaves characterized by different means and standard deviations for the dependent variable. However, differently from the classification tree for categorical variables I cannot find a

Re: [R] Joint density approximation?

2009-11-30 Thread Trafim
You are right. I brought this example just to see how to use its with two time series. In reality I have price process and returns, and I need conditional density. Will highly appreciate your help. I found function kde2d but cannot understand how to call for the values of the matrix. On Mon,

[R] rpart: how to assign observations to nodes in regression trees

2009-11-30 Thread Diego Bellisai
Hi, I am building a regression tree (method=anova) by using rpart package and as a final result I get the final leaves characterized by different means and standard deviations for the dependent variable. However, differently from the classification tree for categorical variables I cannot find a

Re: [R] Learning R

2009-11-30 Thread Adaikalavan Ramasamy
Dear Julia, Welcome. It is good that you wish to learn more about R. R has certainly become very vast in the last few years. Do you wish to learn R for a particular reason (financial analyses, multivariate, prediction/classification, genetics)? You might get more targeted reading materials,

Re: [R] Joint density approximation?

2009-11-30 Thread Trafim
Also what if the grid matrix is not squared? How can I then find this kernel density matrix/ Thanks a lot. On Mon, Nov 30, 2009 at 4:56 PM, Trafim rdapam...@gmail.com wrote: You are right. I brought this example just to see how to use its with two time series. In reality I have price process

Re: [R] Ubuntu tcl/tk problems

2009-11-30 Thread Dirk Eddelbuettel
On 30 November 2009 at 15:12, Peter Dalgaard wrote: | stephen sefick wrote: | Error in firstlib(which.lib.loc, package) : |Tcl/Tk support is not available on this system | Error : package 'tcltk' could not be loaded | | Ubuntu 9.10 | I have both the 8.5 and 8.4 tcl and tk regular and

[R] command similar to colSums for rowSums?

2009-11-30 Thread Will Carr
Working with an NxMxO sized matrix, currently I can do this in my code: if (max(colSums(array)) = number) But to get an equivalent result using rowSums, I have to do: for (i in 1:10) { if (max(rowSums(array[,,i])) = number) } I'm running both in a much larger loop that loops millions of

[R] rpart: how to assign observations to nodes in regression trees

2009-11-30 Thread Diego Bellisai
Hi, I am building a regression tree (method=anova) by using rpart package and as a final result I get the final leaves characterized by different means and standard deviations for the dependent variable. However, differently from the classification tree for categorical variables I cannot find a

Re: [R] Ubuntu tcl/tk problems

2009-11-30 Thread stephen sefick
I used the archives, but I didn't use the FAQs. I removed the compiled version- and all other R versions. I reinstalled through the repository, and everything works fine. Sorry for the inconvenience. regards, Stephen On Mon, Nov 30, 2009 at 10:14 AM, Dirk Eddelbuettel e...@debian.org wrote:

Re: [R] JMP - R ?

2009-11-30 Thread Upton, Stephen C
Hi Robert and Wai-Kuan, I'd be interested as well. I see in the JMP Scripting Book that there appear to be 3 possibilities (all in Chapter 11-at least for version 8): 1. using a JMP DataFeed object 2. using sockets 3. OLE automation Sockets with something like RServe may be the way to go. I have

Re: [R] Scaling variables to positive values using scale() or performing BoxCox on negative data

2009-11-30 Thread David Winsemius
On Nov 30, 2009, at 11:02 AM, Henry Thorogood wrote: Hi, I'm doing some work with linear models, and I've scaled my data using the scale(dataset) function. This was great at removing the skew, but I now can't perform the Box Cox transformation on the data set (using the boxcox(dataset)

[R] RSQLite does not read very large values correctly

2009-11-30 Thread Ruecker, Sebastian
Hello, I am trying to import data from an SQLite database to R. Unfortunately, I seem to get wrong data when I try to import very large numbers. For example: I look at the database via SQLiteStudio(v.1.1.3) and I see the following values: OrderID Day TimeToclose 1

Re: [R] Scaling variables to positive values using scale() or performing BoxCox on negative data

2009-11-30 Thread Henry Thorogood
The scale function seems to have tackled the skew, just looking at the boxplots for the data. The boxcox function I'm using is boxcox(), from MASS. I've looked through the help page, but I don't think (from what I can see) there's a way to make the boxcox function handle the negative values,

Re: [R] Learning R

2009-11-30 Thread Ben Seligman
Hi Julia, I'm also a newcomer to R and to this listserv (in the past two weeks). One book that was recommended to me, and has been extraordinarily helpful in learning how to really make use of R, is A Beginner's Guide to R, which focuses on data entry/import, data manipulation, functions, and

Re: [R] RSQLite does not read very large values correctly

2009-11-30 Thread jim holtman
It appears that you were reading the number in as an integer and not numeric. The value that you are seeing (-596864072) is the numeric value trucated to 32 bit. The number would have been in hex (6DC6C93B8) but dropping the leading '6' you will get the result as a 32 bit integer. Check your

Re: [R] Learning R

2009-11-30 Thread Benton, Paul
Julia, I can vouch for the 'Statistical Analysis in R'. Very good book, I learnt R from it. The other one to look at is Spoetry. It solves a lot of problem for me. Paul http://www.burns-stat.com/pages/spoetry.html On 30 Nov 2009, at 17:17, Ben Seligman wrote: Hi Julia, I'm also a

Re: [R] command similar to colSums for rowSums?

2009-11-30 Thread Peter Ehlers
Does this max(apply(yourArray, 3, rowSums)) give you what you want? -Peter Ehlers Will Carr wrote: Working with an NxMxO sized matrix, currently I can do this in my code: if (max(colSums(array)) = number) But to get an equivalent result using rowSums, I have to do: for (i in 1:10) { if

Re: [R] Scaling variables to positive values using scale() or performing BoxCox on negative data

2009-11-30 Thread David Winsemius
On Nov 30, 2009, at 11:47 AM, Henry Thorogood wrote: The scale function seems to have tackled the skew, just looking at the boxplots for the data. The boxcox function I'm using is boxcox(), from MASS. I'm puzzled. When I look at the boxcox function in MASS it says: Arguments object a

Re: [R] Scaling variables to positive values using scale() or performing BoxCox on negative data

2009-11-30 Thread Henry Thorogood
Great! Have managed to shift my dataset to positive. Thanks for all your help. Henry. 2009/11/30 David Winsemius dwinsem...@comcast.net On Nov 30, 2009, at 11:47 AM, Henry Thorogood wrote: The scale function seems to have tackled the skew, just looking at the boxplots for the data. The

Re: [R] Joint density approximation?

2009-11-30 Thread David Winsemius
On Nov 30, 2009, at 11:20 AM, Trafim wrote: Sorry, maybe I confused everybody with what I want. I have time process X_k, and corresponding returns process R_k I am interesting in f(r|x), which I can find knowing f(r,x) and f(x). I know the latter I need the first. How can I apploximate

Re: [R] command similar to colSums for rowSums?

2009-11-30 Thread Peter Ehlers
Or maybe aperm() is faster: max(colSums(aperm(yourArray, c(2,1,3 -Peter Ehlers Peter Ehlers wrote: Does this max(apply(yourArray, 3, rowSums)) give you what you want? -Peter Ehlers Will Carr wrote: Working with an NxMxO sized matrix, currently I can do this in my code: if

Re: [R] command similar to colSums for rowSums?

2009-11-30 Thread David Winsemius
On Nov 30, 2009, at 11:10 AM, Will Carr wrote: Working with an NxMxO sized matrix, currently I can do this in my code: What are M, N, and O? All the same magnitude? if (max(colSums(array)) = number) But to get an equivalent result using rowSums, I have to do: for (i in 1:10) { if

Re: [R] Assign palette (e.g. rainbow) to a series of points on 1 plot

2009-11-30 Thread Phil Spector
One of the reasons we ask for a *reproducible* example, is that it allows us to test our ideas and make sure that all the details are taken care of. Here's a reproducible example that may help solve your problem: lx100=c(1,1,1,.8,.5,.4,.2,0) day100=c(0,1,2,3,4,5,6,7)

[R] allocating vector memory 1 GByte on Windows XP / Vista / 7

2009-11-30 Thread Jochen Albrecht
Let me begin stating that I read all help files and faq's on the subject matter (there aren't more than about a dozen) but either did not find solutions or found them not to work. Here is the issue. I am trying to run a spatial regression on a medium-sized dataset. Part of the functions in the

Re: [R] command similar to colSums for rowSums?

2009-11-30 Thread Will Carr
David Winsemius wrote: What are M, N, and O? All the same magnitude? In this case, 4,13,10. What are you doing based on that if( ) determination? Increasing a counter. Are you sure you are interpreting your profile results correctly? No, but I think I am. I'm using proc.time()

Re: [R] command similar to colSums for rowSums?

2009-11-30 Thread Will Carr
This gives the correct result but appears to be slower than the for loop I was using, I do appreciate the suggestion though. Peter Ehlers wrote: Does this max(apply(yourArray, 3, rowSums)) give you what you want? -Peter Ehlers Will Carr wrote: Working with an NxMxO sized

Re: [R] command similar to colSums for rowSums?

2009-11-30 Thread Will Carr
This seems to work quite well and gives an ~85% speed increase compared to the for loop. Thanks a bunch! Peter Ehlers wrote: Or maybe aperm() is faster: max(colSums(aperm(yourArray, c(2,1,3 -Peter Ehlers Peter Ehlers wrote: Does this max(apply(yourArray, 3, rowSums))

[R] bug or bizarre feature?

2009-11-30 Thread Rupert Mazzucco
Hello, I'm running into a very strange problem: xrange - c(-2.5,2.5) xdim - 100 mobility - 0.1 slope - 1.16 urange - slope*xrange udim - max(slope*xdim,5) du - (urange[2]-urange[1])/udim uvec - urange[1]+(1:udim-0.5)*du # type dependent weight function

[R] RMySQL unique primary key ??

2009-11-30 Thread Benton, Paul
Dear R-guru's, I have some data that I'm writing to a mysql database. I need the database to generate the primary key and it's not being generated as a unique ID. My understanding was that primary keys should be unique. I submit a data.frame with named columns. The only name that it's missing

Re: [R] bug or bizarre feature?

2009-11-30 Thread David Winsemius
Proably ole Faq 7.21 again. You are using floating point numbers and expecting coercion to result in upward rounding. My guess is that if you use trunc(udim) you will get a different number. Yep: trunc(udim) [1] 115 On Nov 30, 2009, at 2:15 PM, Rupert Mazzucco wrote: Hello, I'm running

Re: [R] bug or bizarre feature?

2009-11-30 Thread Erik Iverson
Simply a manifestation of FAQ 7.31, i.e., a floating-point arithmetic issue. On my machine, 1.16 * 100 == 116 [1] FALSE -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Rupert Mazzucco Sent: Monday, November 30, 2009 1:15

Re: [R] bug or bizarre feature?

2009-11-30 Thread Henrique Dallazuanna
Dim argument must be a integer, see the return of: as.integer(slope*xdim) Try this: udim - ceiling(max(slope*xdim,5)) On Mon, Nov 30, 2009 at 5:15 PM, Rupert Mazzucco r...@gmx.net wrote: Hello, I'm running into a very strange problem: xrange - c(-2.5,2.5) xdim - 100 mobility - 0.1

[R] Is there a way to convert rgb/hex value to a (nearest) color name?

2009-11-30 Thread Jorgy Porgee
Hi all, I'm trying to convert a series of rgb codes into a color name. What is my easiest option? So far I'm stuck with just converting to hex using rgb() and I know R knows a number of colours() but a mapping of the two has failed me. Any help in this regard will be highly appreciated. Regards,

Re: [R] allocating vector memory 1 GByte on Windows XP / Vista / 7

2009-11-30 Thread Duncan Murdoch
In answer to your 4th question: you are trying to allocate an object whose size is 1/4 of the addressable memory on your machine. You might be lucky and have that much available in one piece, but I'm guessing you don't, which is why the allocation fails. So don't worry about questions 1,2,

Re: [R] Is there a way to convert rgb/hex value to a (nearest) color name?

2009-11-30 Thread Duncan Murdoch
On 30/11/2009 2:25 PM, Jorgy Porgee wrote: Hi all, I'm trying to convert a series of rgb codes into a color name. What is my easiest option? So far I'm stuck with just converting to hex using rgb() and I know R knows a number of colours() but a mapping of the two has failed me. Any help in this

Re: [R] Is there a way to convert rgb/hex value to a (nearest) color name?

2009-11-30 Thread Gabor Grothendieck
Try this: mycolor - col2rgb(red); mycolor [,1] red255 green0 blue 0 colors()[sapply(lapply(colors(), col2rgb), identical, mycolor)] [1] red red1 On Mon, Nov 30, 2009 at 2:25 PM, Jorgy Porgee jorgy.por...@gmail.comwrote: Hi all, I'm trying to convert a series of rgb codes

Re: [R] Is there a way to convert rgb/hex value to a (nearest) color name?

2009-11-30 Thread Jorgy Porgee
Fantastic. Thanks Duncan. Clearly my google key words were the wrong ones, nothing of this sort came up. Hope my title is easier to find somehow.. Regards, George __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] Is there a way to convert rgb/hex value to a (nearest) color name?

2009-11-30 Thread Henrique Dallazuanna
You can try something about like this: yourColor - c(250,235,215) colors()[which.min(colSums(col2rgb(colors()) - yourColor )[colSums(col2rgb(colors()) - yourColor) = 0])] On Mon, Nov 30, 2009 at 5:25 PM, Jorgy Porgee jorgy.por...@gmail.com wrote: Hi all, I'm trying to convert a series of rgb

Re: [R] bug or bizarre feature?

2009-11-30 Thread David Winsemius
On Nov 30, 2009, at 2:24 PM, Henrique Dallazuanna wrote: Dim argument must be a integer, see the return of: Less true than you might expect: x - 3.5 y - 5.2 z - array(0, dim=c(x,y)) z [,1] [,2] [,3] [,4] [,5] [1,]00000 [2,]00000 [3,]0

[R] Need help with for loop in forecast

2009-11-30 Thread tobiasfa
Hi I have a ts from 1980:1 trough 2009:9 with a frequency of 12. I want to make 25 6 month forecast where the first 6 month forecast is between 2007:4 - 2007:9 and the last 2009:4 - 2009:9. My script: Forecast - list() for (i in 1:25){ j - i + 326 Data - window(omxr, end = time(omxr)[j])

Re: [R] kernlab's ksvm method freeze

2009-11-30 Thread Heiko Strathmann
Hello again, i got this message from the maintainer: Am Montag, den 30.11.2009, 11:22 +0100 schrieb Heiko Strathmann: Ok, i reported it. thanks for trying it out again. Am 30. November 2009 11:06 schrieb Uwe Ligges lig...@statistik.tu-dortmund.de: My apologies, that must have

Re: [R] Learning R

2009-11-30 Thread Johannes Huesing
Esmail esmail...@gmail.com [Mon, Nov 30, 2009 at 01:07:15PM CET]: ps: Just checked, 'R in a Nutshell': http://oreilly.com/catalog/9780596801717 release date dec 2009/jan 2010 You can't really judge a book by its cover, and in this case not even the cover is presented to us. But

[R] Plotting color.legend() outside of plot region

2009-11-30 Thread Tim Clark
Dear List, I am trying to plot a color.legend() in the right outer margin of my device region. I have read multiple threads on the subject and still can't get it right. I have stolen an example from one of the threads to demonstrate my problem. I have extended the outer margin using

[R] error when installing Rcmdr / tcltk on a Apple laptop

2009-11-30 Thread Karin Groothuis
Hello, I have installed R on my Apple Laptop. Next I wanted to install the package Rcmdr which requires the package tcltk. But then I get errors like: The downloaded packages are in /var/folders/0p/0pD8fDrwHouNDsQ+k8dGmU+++TI/-Tmp-//RtmpSp4q7p/ downloaded_packages Loading required

Re: [R] error when installing Rcmdr / tcltk on a Apple laptop

2009-11-30 Thread Prof Brian Ripley
On Mon, 30 Nov 2009, Karin Groothuis wrote: Hello, I have installed R on my Apple Laptop. Next I wanted to install the package Rcmdr which requires the package tcltk. But then I get errors like: The downloaded packages are in

Re: [R] Learning R

2009-11-30 Thread DispersionMap
Data Analysis and Graphics Using R - An Example-Based Approach John Maindonald and John Braun 2nd edn, Cambridge University Press, January 2007 susan jacobs wrote: Hi, im working in R but honestly i don t know how to apply the formulas in my problem, can someone give some help?

[R] how to calculate axis variance in metaMDS, pakage vegan?

2009-11-30 Thread Gian
Hi there, I am trying to use funcion metaMDS (vegan pakage) for Community Ecology data, but I find no way to calculate the expressed variance of the first 2 axis? is there a way to do that? Thanks a lot in advance, Gian -- View this message in context:

Re: [R] Learning R

2009-11-30 Thread susan jacobs
Hi, im working in R but honestly i don t know how to apply the formulas in my problem, can someone give some help? I already learn how we use the formulas but im not understanding the main issue in my problem. Johannes Huesing wrote: Esmail esmail...@gmail.com [Mon, Nov 30, 2009 at

[R] how to solve a problem in R this problem?can someone help me

2009-11-30 Thread susan jacobs
Census from 1990 california in USA. It’s a data frame with data from 20640 zones from Califórnia. Zones are chosen as being geograficly near, wich one with 1500 persons (mean). For each zone are provided several informations in the colums from data frame: - longitude e latitude from the

Re: [R] kernlab's ksvm method freeze

2009-11-30 Thread Heiko Strathmann
Sorry, heres the message: Hi yes the freeze is rather a result of the kernelMatrix being non-positive definite, have a look at the eigenvalues of kernelMatrix with eigs and you will see even small negative values. This is usualy the result of small numerical inacuracies in the computation of the

Re: [R] Question about output from optim

2009-11-30 Thread Prof. John C Nash
As Ben Bolker has indicated, I am working on various improvements to the functionality of optim() along with others, esp. Ravi Varadhan and Kate Mullen. With relevance to the posts by Sebastien Bihorel and Ben Bolker about output of point/function value information on each evaluation, I am

Re: [R] Plotting color.legend() outside of plot region

2009-11-30 Thread Peter Ehlers
Tim Clark wrote: Dear List, I am trying to plot a color.legend() in the right outer margin of my device region. I have read multiple threads on the subject and still can't get it right. I have stolen an example from one of the threads to demonstrate my problem. I have extended the outer

Re: [R] how to solve a problem in R this problem?can someone help me

2009-11-30 Thread Rolf Turner
You should do your own homework. cheers, Rolf Turner On 1/12/2009, at 10:37 AM, susan jacobs wrote: Census from 1990 california in USA. It’s a data frame with data from 20640 zones from Califórnia. Zones are chosen as being geograficly near, wich one with 1500

[R] normalized kernel question:

2009-11-30 Thread Parminder Mankoo
Hey! Can anyone help me coding in R a normalized kernel matrix. Basically, I want K(x,y)/sqrt(*K*(*x, x*)*K*(*y, y*)) Anyone has a piece of code that you could share? Many thanks, Parmee [[alternative HTML version deleted]] __

[R] Ggplot2: Elegant Graphics for Data Analysis (Use R) (2009 Paperback)

2009-11-30 Thread DispersionMap
Is this book worth its dollar? If so, why?, if not, why not? Cheers. -- View this message in context: http://n4.nabble.com/Ggplot2-Elegant-Graphics-for-Data-Analysis-Use-R-2009-Paperback-tp931702p931702.html Sent from the R help mailing list archive at Nabble.com.

[R] Fitting Distribution to Data

2009-11-30 Thread reezwan you
Hello everyone: I tried to fit a Beta distribution on a right-skewed dataset using: fitdistr(temp,densfun=beta,start=list(shape1=3,shape2=2)) To assess the fit, I proceeded as follows: Using distribution parameters from the sample resulting from fitdistr() function, I generated 1000 samples

  1   2   >