[R] Weighted Multivariate Kernel density estimation with adaptative bandwidth

2008-10-05 Thread fatan souhaib
Bonjour, Est ce qu'il y a un package sous R qui permet de calculer la Kernel density estimation en 2 dimensions avec fentetre variable (calcul du bandwidth avec la méthode du kth nearest neighbor) et possibilité d'ajouter des poids (weight) j'ai cru savoir que le package "locfit" peut faire ceci

[R] "Update in Mac OS"

2008-10-05 Thread Fredrik Lundgren
Dear R-ers, I'm using R 2.7.1 Mac OS. What is the best way for update to 2.7.2 to keep my previous libraries? Fredrik Fredrik Lundgren [EMAIL PROTECTED] Obs! Ny adress och mail Engelbrektsgatan 31 582 21 Linköping 013 - 47 30 117 0706 - 86 39 29 Sommarhus: Ljungnä

[R] Sexy Little Number :-)-O

2008-10-05 Thread Dr Eberhard W Lisse
Got me the Asus EEE PC 1000 (the one with the 8 and 32 GIG solid state drives, and added a 4GiG SD for the swap space. Will add another Gig of RAM for a total of 2). Threw the old (Xandros) Linux off and the EEE specific Ubuntu 8.04.1 onto it. Got an atom Intel processor which apparently has two c

Re: [R] Shadowed Plot

2008-10-05 Thread Jim Lemon
segun ogundimu wrote: Hello R-users Kindly assist me with the following plot problem in R- My data looks like this (shortened because I have about 5000 observations). dat <- read.table(textConnection("Id Time Y 1 0 194 1 5.22 179 1 5.97 190 2 1.61 265 2 2.1 234 2 16.4 300 2 2

Re: [R] "Update in Mac OS"

2008-10-05 Thread [Ricardo Rodriguez] Your XEN ICT Team
Hi Fredrik, Fredrik Lundgren wrote: Dear R-ers, I'm using R 2.7.1 Mac OS. What is the best way for update to 2.7.2 to keep my previous libraries? Not of immediate help: perhaps you could send your message to [EMAIL PROTECTED] Cheers, Ricardo -- Ricardo Rodríguez Your XEN ICT Team ___

Re: [R] color code from csv

2008-10-05 Thread Jim Lemon
kerfuffle wrote: hi folks, this is driving me up the wall. Apologies for posting twice in the same week, I'm writing up a thesis. I wish to color-code some dots in an xy plot. I've got a csv file with various elements, one of which is the color-key (with the header 'color'). If the color-key

Re: [R] Shadowed Plot

2008-10-05 Thread segun ogundimu
I'm Indeed grateful! The code did a perfect job.   regards. --- On Sun, 10/5/08, Jim Lemon <[EMAIL PROTECTED]> wrote: From: Jim Lemon <[EMAIL PROTECTED]> Subject: Re: [R] Shadowed Plot To: [EMAIL PROTECTED] Cc: R-help@r-project.org Date: Sunday, October 5, 2008, 3:31 AM segun ogundimu wrote: >

Re: [R] "Update in Mac OS"

2008-10-05 Thread Dr Eberhard W Lisse
Load the 2.7.2 mini DMBG and install over the top. Finish and klaar. el On 05 Oct 2008, at 11:28 , Fredrik Lundgren wrote: Dear R-ers, I'm using R 2.7.1 Mac OS. What is the best way for update to 2.7.2 to keep my previous libraries? Fredrik -- Dr. Eberhard W. Lisse \/ Obstetricia

Re: [R] Sexy Little Number :-)-O

2008-10-05 Thread Ted Harding
On 05-Oct-08 10:26:29, Dr Eberhard W Lisse wrote: > Got me the Asus EEE PC 1000 (the one with the 8 and 32 GIG solid state > drives, and added a 4GiG SD for the swap space. Will add another Gig > of RAM for a total of 2). Threw the old (Xandros) Linux off and the > EEE specific Ubuntu 8.04.1 onto i

Re: [R] [OOPS!]Sexy Little Number :-)-O

2008-10-05 Thread Ted Harding
[OOPS! By oversight I perpetrated a show-stopper! (Overlooked that I already had Hmisc loaded). Corrected below] On 05-Oct-08 12:18:13, Ted Harding wrote: > On 05-Oct-08 10:26:29, Dr Eberhard W Lisse wrote: >> Got me the Asus EEE PC 1000 (the one with the 8 and 32 GIG solid state >> drives, and a

[R] plyr package: passing further arguments fail

2008-10-05 Thread Auguie, Baptiste
Dear list and Hadley, The new plyr package seems to provide a clean and consistent way to apply a function on several arguments. However, I don't understand why the following example does not work like the standard mapply, library(plyr) df <- data.frame(a=1:10 , b=1:10) foo1 <- function(a, b,

Re: [R] cannot open connection: Authorization Required

2008-10-05 Thread Bernardo Rangel Tura
Em Sex, 2008-10-03 às 11:22 -0700, Spencer Graves escreveu: > Hi, All: > > Is there a way in R to access a file / web site that requires > permission? > > Consider for example the following: > > > > readLines('http://www.r-project.org/', 4) > [1] "" > [2] ""

Re: [R] plyr package: passing further arguments fail

2008-10-05 Thread hadley wickham
On Sun, Oct 5, 2008 at 8:02 AM, Auguie, Baptiste <[EMAIL PROTECTED]> wrote: > Dear list and Hadley, > > The new plyr package seems to provide a clean and consistent way to apply a > function on several arguments. However, I don't understand why the following > example does not work like the stand

Re: [R] package for stochastic frontier models?

2008-10-05 Thread Arne Henningsen
Hi Aaron! I hope that my answer is not too late. On Friday 30 May 2008 00:31, aaront wrote: > I need to estimate maximum tree crown radius and am looking for a package > to prepare stochastic frontier models in R. I have not found any package > references on Nabble R help, google, or R help. Any

[R] efficient use of lm over a matrix vs. using apply over rows

2008-10-05 Thread Mark Kimpel
I have a large matrix, each row of which needs lm applied. I am certain than I read an article in R-news about this within the last year or two that discussed the application of lm to matrices but I'll be darned if I can find it with Google. Probably using the wrong search terms. Can someone steer

Re: [R] efficient use of lm over a matrix vs. using apply over rows

2008-10-05 Thread Duncan Murdoch
On 05/10/2008 10:08 AM, Mark Kimpel wrote: I have a large matrix, each row of which needs lm applied. I am certain than I read an article in R-news about this within the last year or two that discussed the application of lm to matrices but I'll be darned if I can find it with Google. Probably usi

Re: [R] [OOPS!]Sexy Little Number :-)-O

2008-10-05 Thread Carl Witthoft
Ok, I give up: what's that supposed to look like? I tried to replace makeNstr with paste(rep(..)) but got garbage. (my own fault: I still like 10.3.9, so can't install a new enough version of R to install the Hmisc package) Carl __ R-help@r-project.

[R] [R-pkgs] ggplot2 - version 0.7

2008-10-05 Thread hadley wickham
ggplot2 ggplot2 is a plotting system for R, based on the grammar of graphics, which tries to take the good parts of base and lattice graphics and avoid bad parts. It takes care of many of the fiddly details that make plotting a hassle (l

Re: [R] [OOPS!]Sexy Little Number :-)-O

2008-10-05 Thread Barry Rowlingson
2008/10/5 Ted Harding <[EMAIL PROTECTED]>: > sexyNo() How puerile. R should be used for serious purposes. Here is a plot that shows a log-log-log feasible region symmetric about x=0, within a sinusoidal left and right-bound envelope: # set up plot xrange=c(-15,15) yrange=c(0,16) plot(0,xlim=xra

[R] building packages: "R Help for package foo" vs. "HTML Help"?

2008-10-05 Thread Michael Friendly
In building a package, what are the settings in the package files or the build commands that determine whether the compiled HTML help windows have the window title "R Help for package foo" vs. "HTML Help"? I often have quite a few help files active, and it is much more convenient to navigate am

[R] barchart for aggregated (sum) data in lattice?

2008-10-05 Thread Marianne Promberger
Hi list, I have data in a dataframe t1, with a column for different amounts spent, a column what it was spent on, and a column with dates, from which I create a new column with months. Example: amount <- rep(c(10,20,30),3) what <- rep(c("food","books","cycling"),3) when <- c(rep("2008-09-05",5)

Re: [R] Number format in log-scaled lattice xyplots

2008-10-05 Thread Desany, Brian
Thanks - I wasn't thinking about it the right way, and I didn't know where to focus my investigation of the examples. Thank you very much for pointing me at the specific example that solved my problem. For others who might have the same question, that would be the part of the example that transfo

Re: [R] efficient use of lm over a matrix vs. using apply over rows

2008-10-05 Thread Mark Kimpel
Sorry for the vagueness of my question, your interpretation, however, was spot on. Correct me if I am wrong, but my impression is that apply is a more compact way of a for loop, but that the way R handles them computationally are the same. In the article I seem to remember, there was a significant

Re: [R] plyr package: passing further arguments fails

2008-10-05 Thread Auguie, Baptiste
I've found a temporary workaround that may be useful to nail down the problem (if problem there is), If I quote() each additional argument to be passed to fun., everything works fine: df <- data.frame(a=1:10 , b=1:10) foo1 <- function(a, b, cc=0, d=0){ a + b + cc + d } mdply(df, foo1,

Re: [R] [SOLVED] barchart for aggregated (sum) data in lattice?

2008-10-05 Thread Marianne Promberger
Arrgh. I spent so long fiddling with this, and two minutes after I mail to the list I find the solution. barchart(xtabs(amount~month+what, data=t1),stack=F,auto.key=T) (It took me a long time to discover the extended xtabs formula, and before I had kept trying to combine xtabs with the "|" factor

Re: [R] efficient use of lm over a matrix vs. using apply over rows

2008-10-05 Thread Gabor Grothendieck
Sorry, I missed the fact that Duncan had this solution as well at the end of his response. On Sun, Oct 5, 2008 at 1:31 PM, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > In that case, using the example data from the prior response all you need > is: > > coef(lm(t(mat) ~ x)) > > > On Sun, Oct 5, 2

Re: [R] Time Interval calculation using R

2008-10-05 Thread jim holtman
Seems to work fine for me: > times <- c("10:12:34", "14:23:15") > Ptime <- as.POSIXct(strptime(times, "%H:%M:%S")) > > Ptime [1] "2008-10-05 10:12:34 GMT" "2008-10-05 14:23:15 GMT" > difftime(Ptime[2], Ptime[1], units='min') Time difference of 250.6833 mins > You just have to be careful that all

Re: [R] efficient use of lm over a matrix vs. using apply over rows

2008-10-05 Thread Gabor Grothendieck
In that case, using the example data from the prior response all you need is: coef(lm(t(mat) ~ x)) On Sun, Oct 5, 2008 at 1:18 PM, Mark Kimpel <[EMAIL PROTECTED]> wrote: > Sorry for the vagueness of my question, your interpretation, however, was > spot on. Correct me if I am wrong, but my impres

Re: [R] building packages: "R Help for package foo" vs. "HTML Help"?

2008-10-05 Thread Uwe Ligges
Michael Friendly wrote: In building a package, what are the settings in the package files or the build commands that determine whether the compiled HTML help windows have the window title "R Help for package foo" vs. "HTML Help"? Michael, can you give an example for a page with title "HTML

Re: [R] building packages: "R Help for package foo" vs. "HTML Help"?

2008-10-05 Thread Michael Friendly
Uwe Ligges wrote: Michael Friendly wrote: In building a package, what are the settings in the package files or the build commands that determine whether the compiled HTML help windows have the window title "R Help for package foo" vs. "HTML Help"? Michael, can you give an example for a pag

Re: [R] [SOLVED] barchart for aggregated (sum) data in lattice?

2008-10-05 Thread hadley wickham
You can also do it with ggplot2: install.packages("ggplot2") library(ggplot2) qplot(month, weight = amount, fill = what, data=t1, geom="bar") You can find out more at http://had.co.nz/ggplot2 (And you probably want to set the levels of the months so they don't appear in alphabetical order) Had

[R] Graph in vector format to OpenOffice

2008-10-05 Thread Philippe Grosjean
Hello, I know this topic has been discussed already several times. Is it a workable solution that emerged? I would like to place R graph in vector format in an OpenOffice Writer document (solution working in Linux AND Mac OS X AND Windows). I have tried to play with pstoedit to convert .ps fi

Re: [R] Graph in vector format to OpenOffice

2008-10-05 Thread Simon Anders
Philippe Grosjean wrote: > I know this topic has been discussed already several times. Is it a > workable solution that emerged? I would like to place R graph in vector > format in an OpenOffice Writer document (solution working in Linux AND > Mac OS X AND Windows). I have tried to play with pstoed

[R] plot3d - could not find function "xlim"

2008-10-05 Thread Tomas Lanczos
when I tried to apply xlim, ylim, zlim functions to the plot3d/decorate3d, inspite all the help documentation I got this errormessage: ERROR: could not find function "xlim" Is it a bug or possibly my fault? regards tomas __ R-help@r-project.org ma

Re: [R] How to mix different font styles in axis label of lattice plot?

2008-10-05 Thread Paul Murrell
Hi Judith Flores wrote: > Hello, > > I have a y-axis label that reads: "S. schenckii yeast cells". The > part that reads "S. schenckii" needs to be in italic style, the rest > of the text is normal style. How can I specify the different font > styles for each part of the y-axis label? You can

Re: [R] plot3d - could not find function "xlim"

2008-10-05 Thread jim holtman
Seems to work fine for me: plot3d(x, y, z, col=rainbow(1000), size=2, xlim=c(-5,5)) It would help if you "read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code." Since you did not post your code, I assume that there

[R] Conditioning variables in lattice - not all combinations

2008-10-05 Thread Saptarshi Guha
Hello, I have a shingle A and B. A has 5 levels and B has 4 levels. Also, I have 8 levels of a factor C. I wish to xyplot( x ~ y | C *A *B,data=data), I think this is how the lattice conditioning works: If i'm not mistaken, all possible combinations of C,A,B , a subset of the data i

[R] trouble with character \u00e2

2008-10-05 Thread Charles Annis, P.E.
Greetings R-wizards: For historical reasons I have filenames with the character "â" and have successfully used "\u00e2" in its place, with the hoped-for result on all my on-screen plots. However since R2.7.0 I have trouble with savePlot() when the file name includes that character as it does in t

Re: [R] plot3d - could not find function "xlim"

2008-10-05 Thread Rolf Turner
On 6/10/2008, at 6:32 AM, Tomas Lanczos wrote: when I tried to apply xlim, ylim, zlim functions to the plot3d/decorate3d, inspite all the help documentation I got this errormessage: ERROR: could not find function "xlim" Is it a bug or possibly my fault? (a) RTFM. (b) Read the posting guide

Re: [R] Conditioning variables in lattice - not all combinations

2008-10-05 Thread Deepayan Sarkar
On 10/5/08, Saptarshi Guha <[EMAIL PROTECTED]> wrote: > Hello, > I have a shingle A and B. A has 5 levels and B has 4 levels. > Also, I have 8 > levels of a factor C. I wish to xyplot( x ~ y | C *A *B,data=data), > > I think this is how the lattice conditioning works: > If i'm not

Re: [R] plot3d - could not find function "xlim"

2008-10-05 Thread Stefan Grosse
On Sun, 05 Oct 2008 19:32:41 +0200 Tomas Lanczos wrote: TL> when I tried to apply xlim, ylim, zlim functions to the TL> plot3d/decorate3d, inspite all the help documentation I got this TL> errormessage: TL> TL> ERROR: could not find function "xlim" TL> TL> Is it a bug or possibly my fault? Mor

[R] Sample mean in R

2008-10-05 Thread dilian
I am having issues with the following: (muhat = 1/n^2(sum of all the xi's) ) essentially if xbar = the sample mean, muhat = sample mean but square the n. Question: Use R to run a Monte Carlo simulation which compares the finite-sample performance of xbar and muhat. Specifically generate 1000

Re: [R] What is the meaning of "segfault 'memory not mapped' " ?

2008-10-05 Thread Thomas Lumley
On Fri, 3 Oct 2008, Ubuntu.Diego wrote: I'm trying to get some "easy coding" to reproduce the error. In the meantime I have R code that run for 20 or more hours and suddenly i got a "segfault 'memory not mapped'" error. I have to clarify that the error not alway occurs and sometimes the process e

Re: [R] Sample mean in R

2008-10-05 Thread Ted Harding
On 05-Oct-08 20:00:00, dilian wrote: > I am having issues with the following: > > (muhat = 1/n^2(sum of all the xi's) ) > > essentially if xbar = the sample mean, muhat = sample mean but square > the n. > > Question: > Use R to run a Monte Carlo simulation which compares the finite-sample > per

Re: [R] What is the meaning of "segfault 'memory not mapped' " ?

2008-10-05 Thread Ted Harding
One thing I have often done with code (including C and R) that falls through the ice unexpectedly is to plant (as a temporary measure) "debug prints" which emit information about where they are in the program, how many times they have gone round a particular loop, values of any potentially suspect

Re: [R] plot3d - could not find function "xlim"

2008-10-05 Thread Tomas Lanczos
Hello, thank You for Your reply. You are absolutely right, I am a bit tired, forgot to attach the code. I am very sorry about that, as well as I did not recognize that the error message came as a consequence of misstyping the code, my fault again (a real guru maybe recognize this as a misstype

[R] partial matching and dots?

2008-10-05 Thread roger koenker
I'm writing a new predict method and would like to be able to pass an argument called "se" via the "..." mechanism. However, predict has a "se.fit" argument that wants to interpret my specification of "se" as a partially matched version of se.fit. Surely there a standard treatment for this

Re: [R] partial matching and dots?

2008-10-05 Thread Prof Brian Ripley
On Sun, 5 Oct 2008, roger koenker wrote: I'm writing a new predict method and would like to be able to pass an argument called "se" via the "..." mechanism. However, predict has a "se.fit" argument that But it doesn't! Some of its methods such as predict.lm and predict.glm do. So without