Re: [R] how to view/edit large matrix/array in R?

2011-12-05 Thread Liviu Andronic
On Tue, Dec 6, 2011 at 4:42 AM, Michael wrote: > I didn't mean the speed of saving the file is slow... I meant the manual > procedures of exporting and then opening Excel, etc. is slow and > inconvenient and unproductive... > You may want to use RExcel then. Liviu > On Mon, Dec 5, 2011 at 9:38

[R] Problem with clusplot

2011-12-05 Thread elisacarli21
Dear all I'm trying to run a cluster analysis with R Here are the commands: mydata <- na.omit(matrix) # listwise deletion of missing mydata <- scale(matrix) # standardize variables fit <- kmeans(mydata, 8) # 8 cluster solution # get cluster means aggregate(mydata,by=list(fit$cluster),FUN=mean

Re: [R] Problem in while loop

2011-12-05 Thread R. Michael Weylandt
Off the bat I'd suggest you vectorize loglikelihood as a simple one liner: sum(log(b^2 + (x-a)^2)) That alone will speed up your function many times over: I'll look at the big function in more detail tomorrow. Michael On Dec 5, 2011, at 10:37 PM, Gyanendra Pokharel wrote: > Thanks Michael

[R] Can't load package 'lars'

2011-12-05 Thread Luc Villandre
Hi, I installed package 'lars' earlier tonight and did not get any sort of error message. ### ** building package indices ... ** testing if installed package can be loaded Loaded lars 0.9-8 * DONE (lars) ### However, when I try to load it, I get ### > library(lars, lib.loc = "~/R/x86_64-redh

Re: [R] spatial analysis

2011-12-05 Thread Rolf Turner
On 06/12/11 01:44, marianne.zeyrin...@ec.europa.eu wrote: Dear all, I am a PhD student in energy modelling. I am completely stuck with the following problem and would be very grateful for any kind of help. I have cells Don't we all? We're made of them. :-) What do you mean by ``I have

[R] Memory getting eaten up with XML

2011-12-05 Thread Andrew Gormley
Hi all. I have an issue that I cannot resolve. I am trying to read in lots of data that are stored in xml files. But after I read them in and copy the relevant data, then remove the document etc, it doesn't free up the memory. When I monitor it in windows task manager the memory usage just climb

Re: [R] a question on autocorrelation acf

2011-12-05 Thread Bazman76
Hi there, I have now cheked the results against pc give and the excel add-in poptools. Poptools and pc give get the same answer but R is quite different especially for the acf and pacf()? I looked at the book you recommended on p390 itshows the formulas and they look pretty standard. However lo

Re: [R] help! what's wrong with setBreakpoint

2011-12-05 Thread R. Michael Weylandt
A function is a parsed object stored in memory; your edit applies to the source, but not to the memory object being executed. There is no way, to my knowledge, to use browser to alter the execution flow of an function once it's going (other than changing values of course). You need to edit the f

[R] rugarch package: is this forecast correct?

2011-12-05 Thread Ivan Popivanov
Let me start with the code: library(quantmod) library(rugarch) getSymbols("SPY", from="1900-01-01") rets=na.trim(diff(log(Cl(SPY tt = tail(rets["/2004-10-29"], 1000) spec = ugarchspec(variance.model=list(garchOrder=c(1,1)), mean.model=list(armaOrder=c(2,5)), distribution.model="sged") for(ii i

Re: [R] Problem in while loop

2011-12-05 Thread Gyanendra Pokharel
I ma sorry, I miss typed the function, it should be "loglikelihood" instead. On Mon, Dec 5, 2011 at 10:37 PM, Gyanendra Pokharel < gyanendra.pokha...@gmail.com> wrote: > Thanks Michael > Lets figure out the problem by using the following function. I found the > same problem in this code too. > >

Re: [R] how to view/edit large matrix/array in R?

2011-12-05 Thread Michael
I didn't mean the speed of saving the file is slow... I meant the manual procedures of exporting and then opening Excel, etc. is slow and inconvenient and unproductive... On Mon, Dec 5, 2011 at 9:38 PM, R. Michael Weylandt < michael.weyla...@gmail.com> wrote: > I think what most everyone is gett

Re: [R] how to view/edit large matrix/array in R?

2011-12-05 Thread R. Michael Weylandt
I think what most everyone is getting at is that the visual identification of numeric outliers is an exceedingly difficult task and one we humans are not well evolved for. Rather they are all suggesting you use visual techniques to spot and fix outliers individually. This practice has a long and

Re: [R] how to view/edit large matrix/array in R?

2011-12-05 Thread Michael
Too bad... Browse[2]> data.entry(x_range) Error in dataentry(data, modes) : Editing of matrix and data.frame objects is not currently supported in RStudio On Mon, Dec 5, 2011 at 9:27 PM, Michael wrote: > In R-Studio, "edit" gives non-grid based format which is similar to > "fix"... > > But ex

Re: [R] Problem in while loop

2011-12-05 Thread Gyanendra Pokharel
Thanks Michael Lets figure out the problem by using the following function. I found the same problem in this code too. loglikehood <- function(a, b = 0.1, x = c(-4.2, -2.85, -2.3, -1.02, 0.7, 0.98, 2.72, 3.5)) { s <- 0 for(i in 1:length(x)){ s <- s + log(b^2 + (x[i] - a)^2) } s } loglikel

[R] help! what's wrong with setBreakpoint

2011-12-05 Thread Michael
Hi all, I am in the middle of debugging which is stopped using "browser()"... in myfile.R at around line #25. I was then stuck in a big loop which I want to escape and stop the program at the line after the big loop. In the debugging mode, I used Browse[2]> setBreakpoint("myfile.R#38") I th

Re: [R] Problem in while loop

2011-12-05 Thread R. Michael Weylandt
It's not necessarily equivalent to your "loglikelihood" function but since that function wasn't provided I couldn't test it. My broader point is this: you said the problem was that the loop ran endlessly: I showed it does not run endlessly for at least one input so at least part of the problem

Re: [R] how to view/edit large matrix/array in R?

2011-12-05 Thread Michael
In R-Studio, "edit" gives non-grid based format which is similar to "fix"... But exporting to Excel is time-consuming... On Mon, Dec 5, 2011 at 9:17 PM, jim holtman wrote: > 'edit' does allow you to change it. If all else fails, export to > Excel, split the screen and then synchronize the two

Re: [R] how to view/edit large matrix/array in R?

2011-12-05 Thread Michael
Are you responding to my question? I don't understand your answer. How's my question related to "lattice"? Thanks On Mon, Dec 5, 2011 at 8:54 PM, David Winsemius wrote: > > On Dec 5, 2011, at 8:37 PM, jim holtman wrote: > > Have you tried >> >> ?View >> ?edit >> > > Or: > > ?pairs > help(splom,

Re: [R] how to view/edit large matrix/array in R?

2011-12-05 Thread jim holtman
'edit' does allow you to change it. If all else fails, export to Excel, split the screen and then synchronize the two displays. On Mon, Dec 5, 2011 at 9:52 PM, Michael wrote: > View doesn't allow editing? And not multi-window so I cannot put variables > side-by-side for comparsion? Thanks! > > O

Re: [R] how to view/edit large matrix/array in R?

2011-12-05 Thread David Winsemius
On Dec 5, 2011, at 8:37 PM, jim holtman wrote: Have you tried ?View ?edit Or: ?pairs help(splom, package=lattice) (My preference is plot(density()) but the 2d density plots are slow so also use: help(hexbin, package=hexbin) -- david. On Mon, Dec 5, 2011 at 8:12 PM, Bert Gunter w

Re: [R] how to view/edit large matrix/array in R?

2011-12-05 Thread Michael
View doesn't allow editing? And not multi-window so I cannot put variables side-by-side for comparsion? Thanks! On Mon, Dec 5, 2011 at 7:37 PM, jim holtman wrote: > Have you tried > > ?View > ?edit > > On Mon, Dec 5, 2011 at 8:12 PM, Bert Gunter > wrote: > > ... and do you really think perusin

Re: [R] frequency table?

2011-12-05 Thread B77S
Set, This is the same post as your "Similarity Matrix" post. I'm not trying to be a smart ass here, but ... ?Can you fit a square peg in a round hole?... yes, but it doesn't mean it belongs there. I suggest you get a piece of paper and a pencil and figure out 1) what you are trying to do and w

Re: [R] Problem in while loop

2011-12-05 Thread Gyanendra Pokharel
Yes, your function out<- epiann(f = function(a,b) log(dnorm(a)*dnorm(b))), N = 10) works well. But why you are changing the loglikelihood function to f = function(a,b) log(dnorm(a)*dnorm(b))? how it is equivalent to loglikelihood? is there any mathematical relation? I also want to see the plot of

Re: [R] Why can't I figure this out? :S

2011-12-05 Thread B77S
Why can't you figure this out? I think you already know the answer: "I don't speak computer". Time to learn, or get another job I suppose. I hope you at least speak math-statistics if you are going to attempt to understand this. The only way you are going to be able to figure that code ou

Re: [R] Spatstat - problem with which.marks and as.pp

2011-12-05 Thread Rolf Turner
Basically the problem is that you have a *VERY* old version of spatstat. Upgrade! Comments interpolated below. On 05/12/11 21:52, karajamu wrote: I forgot to change the header, so I guess no one read my mail. That's why I'm trying it again... Hello everbody, I am new to this mailing list

Re: [R] how to view/edit large matrix/array in R?

2011-12-05 Thread jim holtman
Have you tried ?View ?edit On Mon, Dec 5, 2011 at 8:12 PM, Bert Gunter wrote: > ... and do you really think perusing thousands of numbers by eye is > any way to edit/check data?! > > Personal viewpoint: I would say that this is a large area of > statistics and data analysis that the discipline f

Re: [R] how to view/edit large matrix/array in R?

2011-12-05 Thread Michael
And is there a way to show variables side-by-side for comparison? On Mon, Dec 5, 2011 at 7:09 PM, Michael wrote: > And "fix" doesn't show the full content... > > On Mon, Dec 5, 2011 at 7:07 PM, Michael wrote: > >> For example, "fix" does have scrolling, but could we have a grid based or >> cell

Re: [R] how to view/edit large matrix/array in R?

2011-12-05 Thread Bert Gunter
... and do you really think perusing thousands of numbers by eye is any way to edit/check data?! Personal viewpoint: I would say that this is a large area of statistics and data analysis that the discipline fails to address in any systematic way ... perhaps because there is no way to address it sy

Re: [R] Why can't I figure this out? :S

2011-12-05 Thread Carl Witthoft
If you 'don't speak computer,' what are you doing trying to run R in the first place? Your email address suggests this is homework, but even if it isn't please go talk to your professor or teaching assistant. From: Jasmine007 Date: Mon, 05 Dec 2011 16:32:00 -0800 (PST) Hi, so I don't speak

Re: [R] how to view/edit large matrix/array in R?

2011-12-05 Thread Michael
And "fix" doesn't show the full content... On Mon, Dec 5, 2011 at 7:07 PM, Michael wrote: > For example, "fix" does have scrolling, but could we have a grid based or > cell based viewer/editor just like Excel sheet or like Matlab's object > editor? > > For some weird reason, "fix" can only show

Re: [R] how to view/edit large matrix/array in R?

2011-12-05 Thread Michael
For example, "fix" does have scrolling, but could we have a grid based or cell based viewer/editor just like Excel sheet or like Matlab's object editor? For some weird reason, "fix" can only show numbers a weird format... On Mon, Dec 5, 2011 at 7:01 PM, Michael wrote: > head, tail and fix comma

[R] how to view/edit large matrix/array in R?

2011-12-05 Thread Michael
head, tail and fix commands don't really work well if I have large matrix/array for which I would like to be able to scroll up and dow, left and right ... Could anybody please help me? Thanks [[alternative HTML version deleted]] __ R-help@r-pr

[R] Why can't I figure this out? :S

2011-12-05 Thread Jasmine007
Hi, so I don't speak computer and I have no idea what this code is telling the program to do, but I apparently need to be able to find and isolate influencial observations. Problem, I have no idea what the error means and where it may be from in the code. error I get is below the code { ## OLS re

Re: [R] Persp3d freezes when run from within Python

2011-12-05 Thread wchips
Thanks Duncan. The thing is, if you want to display a static R graph using Rpy2 you need to bring your Python program to a halt immediately after printing the graph to screen using something like: raw_input("Press any key to continue ...") , otherwise it flashes up on the screen for a fraction of

[R] Plotting Time Series Data by Month

2011-12-05 Thread crazedruff
Hi, I have a dataset which includes monthly data for 17 years. I want to be able to see the monthly data behavior for the period of all 17 years. What my data looks like: http://r.789695.n4.nabble.com/file/n4162534/data.jpg I would like to represent the data in a graph such as the one below:

[R] Plot numeric and categorical variable

2011-12-05 Thread Juliet Ndukum
My data consists of numeric (yy) and categorical (xx) variables, as shown below.  > xx = c(rep("C", 5), rep("D",5))> xx [1] "C" "C" "C" "C" "C" "D" "D" "D" "D" > "D"> yy = rnorm(10, 0, 4)> yy [1]  2.7219346 -3.7142481  6.8716534 -0.9352463 >  0.4901249  3.8113247 [7] -2.6602041  1.7714471  4.729

Re: [R] Problem in while loop

2011-12-05 Thread R. Michael Weylandt
If you run out<- epiann(f = function(a,b) log(dnorm(a)*dnorm(b))), N = 10) It takes less than 0.5 seconds so there's no problem I can see: perhaps you want to look elsewhere to get better speed (like Rcpp or general vectorization), or maybe your loglikihood is not what's desired, but there's no p

Re: [R] plot mixed variables

2011-12-05 Thread Sarah Goslee
plot(xx1, yy, ylim = c(-13.5, 4), col="blue", xaxt="n") axis(1, at=c(1, 2), labels=c("C", "D")) Defining your own axes with axis() offers a great deal of flexibility. And thank you for providing a small reproducible example. Sarah On Mon, Dec 5, 2011 at 5:43 PM, Juliet Ndukum wrote: > > > >  M

Re: [R] installing several versions of R (2.14 and 2.12.2) on the same system on Ubuntu

2011-12-05 Thread Duncan Murdoch
On 11-12-05 4:03 PM, Peter Langfelder wrote: On Mon, Dec 5, 2011 at 11:47 AM, Jannis wrote: Dear R users, besides the current R 2.14 I would like to install a second version of R (2.12.2) on my Ubuntu system. The current version is easily installed as a precompiled package from Cran but I a

Re: [R] args() function does not list function prototype for locally-produced/installed R package

2011-12-05 Thread Duncan Murdoch
On 11-12-05 3:04 PM, Rick Reeves wrote: > Greetings: > > I have check the 'Building R Extensions' manual and can find no advice > on this issue, > so I am asking -- > > I have created an R package consisting entirely of R source code, and > created an installer > using the R CMD build / R CMD chec

[R] plot mixed variables

2011-12-05 Thread Juliet Ndukum
My data consists of a numeric (yy) variable and a categorical (xx) variable, as shown below. xx = c(rep("C", 5), rep("D",5)) yy = rnorm(10, 0, 4) xx1 = as.integer(as.factor(xx))   plot(xx1, yy, ylim = c(-13.5, 4), col="blue")   I wish to generate a scatter plot of the data su

Re: [R] Problem in while loop

2011-12-05 Thread Gyanendra Pokharel
Yes, I checked the acceptprob, it is very high but in my view, the while loop is not stopping, so there is some thing wrong in the use of while loop. When I removed the while loop, it returned some thing but not the result what I want. When i run the while loop separately, it never stops. On Mon,

Re: [R] Problem in while loop

2011-12-05 Thread R. Michael Weylandt
Your code is not reproducible nor minimal, but why don't you put a command print(acceptprob) in and see if you are getting reasonable values. If these values are extremely low it shouldn't surprise you that your loop takes a long time to run. More generally, read up on the use of print() and brows

Re: [R] Shading the plot

2011-12-05 Thread R. Michael Weylandt
As David said, your "minimal working example" is neither minimal nor working...consider this (admittedly quite clunky) example though: time <- seq(10, 20, length.out = 100) S1 <- 10*exp( cumsum(rnorm(100))/20) S2 <- 10*exp( cumsum(rnorm(100))/20) plot(time, S1, ylim = range(c(S1,S2)), type = "n"

Re: [R] problems using the thin plate spline method

2011-12-05 Thread Mintewab Bezabih
Dear Michael and R users, I generated a more orderly looking data again and below are the data and the codes I am trying to run. many thanks mintewab dat <- read.table("E:/thin plate/thin plate.csv", header=T, sep=",") names(dat) <- c("x1", "x2", "y") library(fidelds) plot (dat) plot (dat$x1, d

Re: [R] Toggle cASE

2011-12-05 Thread Tonio
Thanks a lot Eik!   That is exactly what I was looking for.   Best Antonio Fra: Eik Vettorazzi Cc: "r-help@R-project.org" Sendt: 23:21 mandag den 5. december 2011 Emne: Re: [R] Toggle cASE Hi Antonio, how about this: txt2 <- "useRs may fly into JFK or laGuar

Re: [R] nipals in the chemometrics package in R

2011-12-05 Thread zz dd
That's solved. Just a cor between X and ti values. Thank you all. 2011/12/5 zz dd > Thank's Pedro Madrones, > you're right that i have removed my name of the email (because of Spam, > and datas that i can't remove on the net). > Ok, i explain a bit more : > > X is a centred matrix. > PCA summar

Re: [R] a question on autocorrelation acf

2011-12-05 Thread R. Michael Weylandt
Did you check the MASS reference given above in the thread? If you want to see the source, it's here: http://svn.r-project.org/R/trunk/src/library/stats/src/filter.c (best I can tell) Michael On Mon, Dec 5, 2011 at 2:24 PM, Bazman76 wrote: > Hi there, > > I am wondering how R calculates the acf

Re: [R] Binning the data based on a value

2011-12-05 Thread R. Michael Weylandt
Add the drop = TRUE command to split ?split split(a, cut(a$spending, breaks = (0:5)*100), drop = TRUE) Michael On Mon, Dec 5, 2011 at 4:06 PM, Diviya Smith wrote: > Thank you very much Michael. This is very helpful. However, if there is any > way to exclude zero length bins. Lets imagine that t

Re: [R] Binning the data based on a value

2011-12-05 Thread Diviya Smith
Thank you very much Michael. This is very helpful. However, if there is any way to exclude zero length bins. Lets imagine that the matrix was as follows - a <- data.frame(patient=1:7, charges=c(100,500,200,90,400,500,600), age=c(0,3,5,7,10,16,19), spending=c(10, 60, 110, 200, 400, 450, 500)) bi

Re: [R] installing several versions of R (2.14 and 2.12.2) on the same system on Ubuntu

2011-12-05 Thread Peter Langfelder
On Mon, Dec 5, 2011 at 11:47 AM, Jannis wrote: > Dear R users, > > > besides the current R 2.14 I would like to install a second version of R > (2.12.2) on my Ubuntu system. The current version is easily installed as a > precompiled package from Cran but I am heavily fighting with the older > v

[R] Summary coefficients give NA values because of singularities

2011-12-05 Thread Gathurst
Hello, I have a data set which I am using to find a model with the most significant parameters included and most importantly, the p-values. The full model is of the form: sad[,1]~b_1 sad[,2]+b_2 sad[,3]+b_3 sad[,4]+b_4 sad[,5]+b_5 sad[,6]+b_6 sad[,7]+b_7 sad[,8]+b_8 sad[,9]+b_9 sad[,10], where

Re: [R] a question on autocorrelation acf

2011-12-05 Thread Bazman76
Hi there, I am wondering how R calculates the acf too? I have a data set of approx 1500 returns when I calculate the lag 1 autocorrelation in excel I get a value of -0.4 but in R its approximately -0.18? I have cross checked with PC give and PC give agrees with excel? I'm sure its just some kin

[R] args() function does not list function prototype for locally-produced/installed R package

2011-12-05 Thread Rick Reeves
Greetings: I have check the 'Building R Extensions' manual and can find no advice on this issue, so I am asking -- I have created an R package consisting entirely of R source code, and created an installer using the R CMD build / R CMD check commands. The package installs correctly, using R

Re: [R] Problem in while loop

2011-12-05 Thread Gyanendra Pokharel
I forgot to upload the R-code in last email, so heare is one epiann <- function(T0 = 1, N=1000, ainit=1, binit=1,rho = 0.99, amean = 3, bmean=1.6, avar =.1, bvar=.1, f){ moving <- 1 count <- 0 Temp <- T0 aout <- ainit bout <- binit while(moving > 0)

[R] Problem in while loop

2011-12-05 Thread Gyanendra Pokharel
Hi all, I have the following code, When I run the code, it never terminate this is because of the while loop i am using. In general, if you need a loop for which you don't know in advance how many iterations there will be, you can use the `while' statement so here too i don't know the number how ma

Re: [R] Binning the data based on a value

2011-12-05 Thread R. Michael Weylandt
Just a clarification: I can't get round to work as I first expected so if you want to do bins by 100's you'd probably want: split(a, cut(a$spending, breaks = (0:5)*100)) Michael On Mon, Dec 5, 2011 at 3:41 PM, R. Michael Weylandt wrote: > I'd so something like > > split(a, a$spending) > > and y

Re: [R] Binning the data based on a value

2011-12-05 Thread R. Michael Weylandt
I'd so something like split(a, a$spending) and you can include a round(a$spending, -2) or something similar if you want to group by the 100's. Michael On Mon, Dec 5, 2011 at 3:37 PM, Diviya Smith wrote: > Hello there, > > I have a matrix with some data and I want to split this matrix based on

[R] Binning the data based on a value

2011-12-05 Thread Diviya Smith
Hello there, I have a matrix with some data and I want to split this matrix based on the values in one column. Is there a quick way of doing this? I have looked at cut but I am not sure how to exactly use it? for example: I would like to split the matrix "a" based on the spending such that the da

Re: [R] adding hyperlinked text to pdf plot

2011-12-05 Thread Paul Murrell
Hi On 6/12/2011 9:10 a.m., Justin Fincher wrote: For example, say I am plotting some data that is genomic and therefore maps to a specific locus on the human genome, like a gene. I was hoping to have the title of the plot display the gene name, but have it be a link so that clicking on it would

Re: [R] adding hyperlinked text to pdf plot

2011-12-05 Thread Yihui Xie
Sorry I experimented with tikzDevice using \href{}{} but failed. You can probably try the old image hotspot technique in HTML. I remember someone did this before in R, but I cannot find the link to the work now. The key is your need to use the two functions grconvertX and grconvertY. Regards, Yih

Re: [R] adding hyperlinked text to pdf plot

2011-12-05 Thread Duncan Murdoch
On 05/12/2011 3:10 PM, Justin Fincher wrote: For example, say I am plotting some data that is genomic and therefore maps to a specific locus on the human genome, like a gene. I was hoping to have the title of the plot display the gene name, but have it be a link so that clicking on it would take

Re: [R] adding hyperlinked text to pdf plot

2011-12-05 Thread Justin Fincher
For example, say I am plotting some data that is genomic and therefore maps to a specific locus on the human genome, like a gene. I was hoping to have the title of the plot display the gene name, but have it be a link so that clicking on it would take you to those coordinates on a public browser,

Re: [R] lists everywhere

2011-12-05 Thread William Dunlap
First, some general suggestions: To see the structure of an object I would recommend the str() function or, for a more concise output, the class() function. I don't think most ordinary users should be using is.list() and, especially, is.vector(). Now for the particulars. dbGetQuery pr

[R] installing several versions of R (2.14 and 2.12.2) on the same system on Ubuntu

2011-12-05 Thread Jannis
Dear R users, besides the current R 2.14 I would like to install a second version of R (2.12.2) on my Ubuntu system. The current version is easily installed as a precompiled package from Cran but I am heavily fighting with the older version. I tried to follow the instructions here: http://cra

[R] SOLVED, Re: lists everywhere

2011-12-05 Thread Kehl Dániel
nevermind, typo (and some gray hair) sorry 12/5/2011 8:21 PM keltezéssel, Kehl Dániel írta: Dear list members, I have a really simple problem. I connected to a DB and have the following query adat <- dbGetQuery(con, paste("select * from kmdata where SzeAZ='", szeazok[i], "' order by datum",

Re: [R] explanation why RandomForest don't require a transformations (e.g. logarithmic) of variables

2011-12-05 Thread Liaw, Andy
You should see no differences beyond what you'd get by running RF a second time with a different random number seed. Best, Andy From: gianni lavaredo [mailto:gianni.lavar...@gmail.com] Sent: Monday, December 05, 2011 2:19 PM To: Liaw, Andy Cc: r-help@r-project.or

[R] lists everywhere

2011-12-05 Thread Kehl Dániel
Dear list members, I have a really simple problem. I connected to a DB and have the following query adat <- dbGetQuery(con, paste("select * from kmdata where SzeAZ='", szeazok[i], "' order by datum", sep="")) now I have the data in the adat variable which is a list. In fact the elements of t

Re: [R] explanation why RandomForest don't require a transformations (e.g. logarithmic) of variables

2011-12-05 Thread gianni lavaredo
about the " because they only use the ranks of the variables". Using a leave-one-out, in each interaction the the predictor variable ranks change slightly every time RF builds the model, especially for the variables with low importance. Is It correct to justify this because there are random splitti

Re: [R] adding hyperlinked text to pdf plot

2011-12-05 Thread Yihui Xie
It seems I missed the context of this post -- who is "you", and what is "something other than the URL"? I feel the tikzDevice package should be an option for the task. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Sned

Re: [R] adding hyperlinked text to pdf plot

2011-12-05 Thread David Winsemius
On Dec 5, 2011, at 1:39 PM, Justin Fincher wrote: Howdy, I have read that if you put a URL in the text of a plot being saved into pdf, the result is a functional hyperlink. Don't believe everything you read. pdf("test.pdf") plot(1,1,main="http://test.gov/some.htm";) dev.off() "Non-funct

Re: [R] explanation why RandomForest don't require a transformations (e.g. logarithmic) of variables

2011-12-05 Thread Liaw, Andy
Tree based models (such as RF) are invriant to monotonic transformations in the predictor (x) variables, because they only use the ranks of the variables, not their actual values. More specifically, they look for splits that are at the mid-points of unique values. Thus the resulting trees are

Re: [R] adding hyperlinked text to pdf plot

2011-12-05 Thread Ted Harding
On 05-Dec-11 18:39:21, Justin Fincher wrote: > Howdy, >I have read that if you put a URL in the text of a plot > being saved into pdf, the result is a functional hyperlink. > I am interested in having text in a plot that is linked to > a URL, but I would like the text to be something other than

[R] explanation why RandomForest don't require a transformations (e.g. logarithmic) of variables

2011-12-05 Thread gianni lavaredo
Dear Researches, sorry for the easy and common question. I am trying to justify the idea of RandomForest don't require a transformations (e.g. logarithmic) of variables, comparing this non parametrics method with e.g. the linear regressions. In leteruature to study my phenomena i need to apply a l

[R] adding hyperlinked text to pdf plot

2011-12-05 Thread Justin Fincher
Howdy, I have read that if you put a URL in the text of a plot being saved into pdf, the result is a functional hyperlink. I am interested in having text in a plot that is linked to a URL, but I would like the text to be something other than the URL. Is this possible? Thank you. - Fincher

Re: [R] barplot ignoring col parameter

2011-12-05 Thread R. Michael Weylandt
barplot() defaults to stacked bars for matrices and uses the colors fresh for each bar: e.g., layout(1:2) barplot(matrix(1:6, 2), col = c("red", "blue","green")) barplot(matrix(1:6, 3), col = c("red", "blue","green")) To get what you are looking for, try something like this: x = matrix(1:6,1); c

Re: [R] Weighting and recodification

2011-12-05 Thread David Winsemius
On Dec 5, 2011, at 10:19 AM, SilvaForever wrote: I have a question that is more statistical than r-specific I have to recode a variable into quartiles, and I have weighted individuals. To calculate the quartiles that will serve me to recode the variable, should I use the weight or not?

Re: [R] barplot ignoring col parameter

2011-12-05 Thread Federico Calboli
On 5 Dec 2011, at 15:58, R. Michael Weylandt wrote: > x <- c(2L, 108L, 0L, 0L, 0L, 1L, 3L, 0L, 0L, 0L, 0L, 0L, 7L, 18L, > 3L, 4L, 8L, 20L, 26L, 20L, 19L, 7L, 1L, 1L) > mycol = c(rep('yellow', 2), rep('white', 3), rep('orange',2), > rep('white', 5), rep('orange',3), rep('red',9)) > barplot(x, col

[R] Flexclust package: kcca object's methods and properties?

2011-12-05 Thread Pundurs, Mark
What are all the methods and properties for the flexclust package's kcca object? Neither http://cran.r-project.org/web/packages/flexclust/flexclust.pdf nor http://www.stat.uni-muenchen.de/~leisch/papers/Leisch-2006.pdf appear to include a comprehensive centralized list. Mark Pundurs Data Analyst -

[R] Weighting and recodification

2011-12-05 Thread SilvaForever
I have a question that is more statistical than r-specific I have to recode a variable into quartiles, and I have weighted individuals. To calculate the quartiles that will serve me to recode the variable, should I use the weight or not? -- View this message in context: http://r.789695.n4.nabble

Re: [R] extract cov matrix in summary.rq and use as a matrix.

2011-12-05 Thread Julia Lira
Dear Michael, Thank you very much for your suggestion. It indeed worked! All the best, Julia > CC: r-help@r-project.org > From: michael.weyla...@gmail.com > Subject: Re: [R] extract cov matrix in summary.rq and use as a matrix. > Date: Mon, 5 Dec 2011 07:55:45 -0500 > To: julia.l...@hotmail.

Re: [R] finding interpolated values along an empirical parametric curve

2011-12-05 Thread Michael Friendly
Thanks, John That's very clever. I didn't realize that the splines package supports multivariate regression splines and that works well enough for my purposes; plus this solution is very transparent. best, -Michael On 12/5/2011 9:50 AM, John Fox wrote: Hi Michael, I can get what appears t

Re: [R] barplot ignoring col parameter

2011-12-05 Thread R. Michael Weylandt
x <- c(2L, 108L, 0L, 0L, 0L, 1L, 3L, 0L, 0L, 0L, 0L, 0L, 7L, 18L, 3L, 4L, 8L, 20L, 26L, 20L, 19L, 7L, 1L, 1L) mycol = c(rep('yellow', 2), rep('white', 3), rep('orange',2), rep('white', 5), rep('orange',3), rep('red',9)) barplot(x, col = mycol) Produces a multi-colored barplot on my machine so I un

Re: [R] barplot ignoring col parameter

2011-12-05 Thread David Winsemius
On Dec 5, 2011, at 10:44 AM, Federico Calboli wrote: Hi All, I'm having a problem with barplot: mydata [1,] 2 108 0 0 0 1 3 0 0 0 0 0 7 18 3 4 8 20 26 20 19 7 1 1 mycol = c(rep('yellow', 2), rep('white', 3), rep('orange',2), rep('white', 5), rep('orange',3), rep('red',

Re: [R] nipals in the chemometrics package in R

2011-12-05 Thread zz dd
Thank's Pedro Madrones, you're right that i have removed my name of the email (because of Spam, and datas that i can't remove on the net). Ok, i explain a bit more : X is a centred matrix. PCA summarise all variation of X into a few new variables called scores T.These new variables are linearly we

[R] barplot ignoring col parameter

2011-12-05 Thread Federico Calboli
Hi All, I'm having a problem with barplot: mydata [1,] 2 108 0 0 0 1 3 0 0 0 0 0 7 18 3 4 8 20 26 20 19 7 1 1 mycol = c(rep('yellow', 2), rep('white', 3), rep('orange',2), rep('white', 5), rep('orange',3), rep('red',9)) barplot(mydata, col = mycol) gives me an uniformly yell

[R] using StatEt IDE for Eclipse

2011-12-05 Thread Matteo Richiardi
Hi, I'm trying to use StatEt IDE for Eclipse as my R editor, but I'm completely lost. I've read all I could find online, made apparently all I had to do (installing rj, configuraing StatEt, etc.) but still cannot make R running. Below is the error log file. Thank you so much for assistance. Matteo

Re: [R] equating approximate values

2011-12-05 Thread David Winsemius
On Dec 5, 2011, at 8:02 AM, R. Michael Weylandt wrote: Change which to which.min, but then you won't easily be able to get the corresponding x,y indices. Look at the arrayInd() function to translate the result to a particular x,y. The arrayInd help page is shared by the which help and whic

Re: [R] similarity matrix

2011-12-05 Thread B77S
That really all depends on what you need; and I can't tell you what you need. set wrote > > I'm sorry, I made a mistake in my example. you're right. I don't really > know how a similarity alogrithm worksbut I'm willing to try that...are > there any good examples available? > Thank you >

Re: [R] R 2-14.0 locking up

2011-12-05 Thread Steve Lianoglou
Hi, On Mon, Dec 5, 2011 at 10:03 AM, Erin Hodgess wrote: > Dear R People: > > I'm working with R-2.14.0 created from source on a quad core Windows 7 > machine. > > Starting yesterday, nearly everything I run just sits.  When I hit > escape or Ctrl C, nothing happens. > > Has anyone run into this

Re: [R] nipals in the chemometrics package in R

2011-12-05 Thread Pedro Mardones
Perhaps you can try the examples given in http://www.jstatsoft.org/v18/i02 for getting a better idea about how the NIPALS algorithm works. BTW, yes,it looks like a homework question specially when your user name is "zz dd " so you can't be recognized. On Mon, Dec 5, 2011 at 9:27 AM, zz dd wrote

[R] R 2-14.0 locking up

2011-12-05 Thread Erin Hodgess
Dear R People: I'm working with R-2.14.0 created from source on a quad core Windows 7 machine. Starting yesterday, nearly everything I run just sits. When I hit escape or Ctrl C, nothing happens. Has anyone run into this, please? Any suggestions would be much appreciated. Thanks, Erin -- E

Re: [R] finding interpolated values along an empirical parametric curve

2011-12-05 Thread John Fox
Hi Michael, I can get what appears to be a good interpolation with a regression spline in a multivariate LM, playing around with the tuning parameter to leave 1 residual df. Try this: library(splines) mod <- lm(cbind(log.det, norm.beta) ~ bs(lambda, df=4), data=pd) summary(mod) x <- data.frame(l

Re: [R] iterative variable names

2011-12-05 Thread S Ellison
> -Original Message- > Thank you very much, assign was exactly what I needed! For my > case, it worked better than list! :) If assign(paste('x_', i)) works better for your case than using a list or array , you must surely have a very strange case S Ellison**

[R] finding interpolated values along an empirical parametric curve

2011-12-05 Thread Michael Friendly
Given the following data, I am plotting log.det ~ norm.beta, where the points depend on a parameter, lambda (but there is no functional form). I want to find the (x,y) positions along this curve corresponding to two special values of lambda lambda.HKB <- 0.004275357 lambda.LW <- 0.03229531 an

Re: [R] about interpretation of anova results...

2011-12-05 Thread Roger Koenker
If you were to rtfm you'd see that your anova suggests that the slope coefficients are the same for your tau = .15 and tau = .30 models. url:www.econ.uiuc.edu/~rogerRoger Koenker emailrkoen...@uiuc.eduDepartment of Economics vox: 217-333-4558Uni

Re: [R] extract cov matrix in summary.rq and use as a matrix.

2011-12-05 Thread R. Michael Weylandt
No problem, almost all "complicated" objects that get returned are internally lists so you have to use [[ to get at them as [ will just give you a list again. Take a look at ? '[[' # those should be back ticks for the official documentation. Best, M On Dec 5, 2011, at 8:09 AM, Julia Lira w

Re: [R] Persp3d freezes when run from within Python

2011-12-05 Thread Duncan Murdoch
On 11-12-04 8:57 PM, wchips wrote: G'day everyone, I've been trying to get an interactive OpenGL plot to work from within Python 2.6 using Rpy2 and the persp3d function. The problem is that the plot seems to freeze upon activation. All interactivity is lost even though it works fine when run fro

Re: [R] Project local libraries (reproducible research)

2011-12-05 Thread Hadley Wickham
On Sat, Dec 3, 2011 at 11:16 AM, Jim Lemon wrote: > On 12/03/2011 06:04 AM, Hadley Wickham wrote: >> >> Hi all, >> >> I was wondering if any one had scripts that they could share for >> capturing the current version of R packages used for a project. I'm >> interested in creating a project local li

Re: [R] problems using the thin plate spline method

2011-12-05 Thread Mintewab Bezabih
Thanks Michael here is my data structure(list(x1 = c(409.5, 349, 385.5, 273, 543, 746, 198.75, 262.5, 320.5, 259, 399.5, 595.5, 374, 293, 330, 658, 299, 775, 559.75, 251, 402, 395.5, 345.5, 283.5, 452, 816.5, 266.5, 360.25, 386, 160.25, 360, 337, 326, 758, 342.5, 389, 347.5, 819.25, 355.25, 281,

  1   2   >