[R] confusion matrix in randomForest

2008-07-20 Thread Miklos Kiss
I have a question on the output generated by randomForest in classification mode, specifically, the confusion matrix. The confusion matrix lists the various classes and how the forest classified each one, plus the classification error. Are these numbers essentially averages over all the trees

[R] problem with read.table

2008-07-20 Thread carol white
Hi, Although I set check.names to FALSE in read.table, the duplicate names get modified. What should be done in this case? the text file to be read by read.table AM2  AM2 AM2 FAL 2   3 4 5 1   -1   -3    -2 t = read.table

Re: [R] R version 2.7.1 (warnings)

2008-07-20 Thread Van Wyk, Jaap
Thanks, Mark, for the response. The problem is vith SciViews. It is not stable under the latest version of R. I found a solution by downloading the latest version of Tinn-R, which communicates with the latest version of R, and now I can carry on like normal (with both windows tiled

Re: [R] Sweave add code \201

2008-07-20 Thread Christophe Genolini
Peter Dalgaard a écrit : Christophe Genolini wrote: Hi the list, I do not understand what change in my configuration, but Sweave add the code \201 before each special characters é è à ç ... Does someone know when it come from ? MULE (multilingal environment) in Emacs used to be prone to do

Re: [R] R version 2.7.1 (warnings)

2008-07-20 Thread Mark Difford
Hi Jaap, Great stuff! As the old adage went, Go well, go Bye, Mark. Van Wyk, Jaap wrote: Thanks, Mark, for the response. The problem is vith SciViews. It is not stable under the latest version of R. I found a solution by downloading the latest version of Tinn-R, which communicates

Re: [R] Discretize continous variables....

2008-07-20 Thread Johannes Huesing
Frank E Harrell Jr [EMAIL PROTECTED] [Sun, Jul 20, 2008 at 12:20:28AM CEST]: Johannes Huesing wrote: Because regulatory bodies demand it? [...] And how anyway does this relate to predictors in a model? Not at all; you're correct. I was mixing the topic of this discussion up with another

[R] problem with read.table

2008-07-20 Thread carol white
Hi, Although I set check.names to FALSE in read.table, the duplicate names get modified. What should be done in this case? the text file to be read by read.table AM2  AM2 AM2 FAL 2   3 4 5 1   -1   -3    -2 t = read.table

Re: [R] estimating volume from xyz points

2008-07-20 Thread Gabor Grothendieck
On Sat, Jul 19, 2008 at 5:21 PM, milton ruser [EMAIL PROTECTED] wrote: Dear all, I have several sets of x-y-z points and I need to estimate the volume that encompass all my points. Recently I got some adivice to show the convex hull of my points using geometry package (see code below). But

[R] R interprets symbol as q()

2008-07-20 Thread Roger Leenders
R2.7.1, WinXP Hi, My question is probably easy to answer, but I can't seem to solve it myself. I need to read in a large number of datasets that were generated by another (old) software program. Each data file contains a bunch of additional code generated by the external software. It lists

Re: [R] problem with read.table

2008-07-20 Thread jim holtman
If you really want to do it, here is a way, but don't expect to be able to reference the columns by name; this is just so it 'prints pretty': x - textConnection(AM2 AM2 AM2 FAL + 2 3 4 5 + 1 -1 -3-2) # read the

Re: [R] R interprets symbol as q()

2008-07-20 Thread jim holtman
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. It would be nice to see at least a subset of the data you are reading. I would assume that if you are using 'read.table' to read in the data, then there

Re: [R] Parametric survival models with left truncated, right censored data

2008-07-20 Thread Göran Broström
I uploaded eha-1.2-0 to CRAN a day ago. This version can handle accelerated failure time and proportional hazards parametric models for right censored, left truncated, and stratified data. Included distributions are: Weibull, lognormal, loglogistic, Gompertz, and extreme value. The new inner

[R] Error in edit(name,file,title,editor)

2008-07-20 Thread David Epstein
Can anyone help me with the following attempt to use an external editor from within R vi(file=p286.R) Error in edit(name, file, title, editor) : unable to open file to read edit(file=p286.R) Error in edit(name, file, title, editor) : unable to open file to read I have only recently

[R] Order of columns(variables) in dataframe

2008-07-20 Thread Daniel Wagner
Dear R experts,   I have a dataframe with 4 columns (variables). I want to redorder (or reposition) these columns on the basis of a value in its last row. e.g.   df1-data.frame( v1= c(2,3,1,9,5), v2=c(8,5,12,4,11), v3=c(7,8,2,6,9), v4=c(1,4,6,3,6))    df1    v1 v2 v3 v4 1  2  8  7  1

Re: [R] Order of columns(variables) in dataframe

2008-07-20 Thread jim holtman
Is this what you want: x - read.table(textConnection( v1 v2 v3 v4 + 1 2 8 7 1 + 2 3 5 8 4 + 3 1 12 2 6 + 4 9 4 6 3 + 5 5 11 9 6), header=TRUE) closeAllConnections() # order by the last row x[, order(unlist(x[5,]), decreasing=TRUE)] v2 v3 v4 v1 1 8 7 1 2 2 5 8 4 3

Re: [R] Error in edit(name,file,title,editor)

2008-07-20 Thread jim holtman
Make sure you are in the right directory; you can also use the full path names. It is basically saying it can not find the file. Do 'list.files()' to see what is addressable in whatever directory you are in. On Sun, Jul 20, 2008 at 7:19 AM, David Epstein [EMAIL PROTECTED] wrote: Can anyone

Re: [R] Order of columns(variables) in dataframe

2008-07-20 Thread Dimitris Rizopoulos
try this: df1 - data.frame(v1 = c(2,3,1,9,5), v2 = c(8,5,12,4,11), v3 = c(7,8,2,6,9), v4 = c(1,4,6,3,6)) vals - unlist(df1[5, ]) df1[order(vals, decreasing = TRUE)] I hope it helps. Best, Dimitris Dimitris Rizopoulos Biostatistical Centre School of Public Health Catholic University

Re: [R] Order of columns(variables) in dataframe

2008-07-20 Thread Ted Harding
On 20-Jul-08 11:32:14, Daniel Wagner wrote: Dear R experts, I have a dataframe withÂ_4 columns (variables). I want to redorder (or reposition) these columns on the basis of a value in its last row. e.g. df1-data.frame( v1= c(2,3,1,9,5), v2=c(8,5,12,4,11), v3=c(7,8,2,6,9), v4=c(1,4,6,3,6))

Re: [R] calculate differences - strange outcome

2008-07-20 Thread Bernardo Rangel Tura
Em Qui, 2008-07-17 às 11:47 +0200, Kunzler, Andreas escreveu: Dear List, I ran into some trouble by calculating differences. For me it is important that differences are either 0 or not. So I don't understand the outcome of this calculation 865.56-(782.86+0+63.85+18.85+0) [1]

Re: [R] Error in edit(name,file,title,editor)

2008-07-20 Thread David Epstein
Thanks. The file didn't exist at the time I tried edit, and that was my error. David On 20 Jul, 2008, at 12:44, jim holtman wrote: Make sure you are in the right directory; you can also use the full path names. It is basically saying it can not find the file. Do 'list.files()' to see what

[R] drawing segments through points with pch=1

2008-07-20 Thread David Epstein
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 is a collection of small circles, with a segment on top

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

2008-07-20 Thread Paul Smith
On Sun, Jul 20, 2008 at 1:44 PM, 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)

Re: [R] Discretize continous variables....

2008-07-20 Thread Frank E Harrell Jr
Johannes Huesing wrote: Frank E Harrell Jr [EMAIL PROTECTED] [Sun, Jul 20, 2008 at 12:20:28AM CEST]: Johannes Huesing wrote: Because regulatory bodies demand it? [...] And how anyway does this relate to predictors in a model? Not at all; you're correct. I was mixing the topic of this

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

2008-07-20 Thread Prof Brian Ripley
On Sun, 20 Jul 2008, Uwe Ligges wrote: You probably want to make your code readable, read ?points and go ahead by making the plot without points (plot(., type=n)), drawing segments and at the end paint points with white background colour in order to overwrite the segments: Except that

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

2008-07-20 Thread David Epstein
What I don't like about type=b, also suggested by Paul Smith, is that the segments do not go right up to the little circles---a gap is left, which I don't like. So far, Uwes' solution is what suits me best. However, I understand Brian's objection, though it doesn't apply in my case. The

Re: [R] R interprets symbol as q()

2008-07-20 Thread Dieter Menne
Roger Leenders r.t.a.j.leenders at rug.nl writes: After the data for the final respondent, the file contains a , followed by some zeroes. R now needs to read the data until the  symbol. The symbol is not readable in my viewer, but try the following: put it into the clipboard, and paste it

Re: [R] smooth.spline

2008-07-20 Thread Spencer Graves
Are you aware that there are many different kinds of splines? With spline and splinefun, you can use method = fmm (Forsyth, Malcolm and Moler), natural, or periodic. I'm not familiar with fmm, but it seems to be adequately explained by the Manual spline evaluation you quoted from the

Re: [R] principal factor analysis

2008-07-20 Thread Hans W. Borchers
Jinsong Zhao jszhao at mail.hzau.edu.cn writes: Hi, Is there a function to do principal factor analysis in R? Do a 'RSiteSearch(factor analysis)' and you will find several packages for Factor Analysis, such as: FAiRFactor Analysis in R FactoMineR Factor Analysis and Data

Re: [R] smooth.spline

2008-07-20 Thread Duncan Murdoch
On 20/07/2008 11:11 AM, Spencer Graves wrote: Are you aware that there are many different kinds of splines? With spline and splinefun, you can use method = fmm (Forsyth, Malcolm and Moler), natural, or periodic. I'm not familiar with fmm, but it seems to be adequately explained by the

[R] Access to values of function arguments

2008-07-20 Thread willemf
Does anyone know of good reading material about the following? The R language definition does not appear to explicitly address my problem (maybe I misread that document?) I have a function definition: func(a) cat(Anova for variable ,a) What I wish to achieve is to call func with a value such

[R] How do I install Joomla! 1.5?

2008-07-20 Thread Fido
Installing of Joomla! 1.5 is pretty easy. We assume you have set-up your Web site, and it is accessible with your browser. Download Joomla! 1.5, unzip it and upload/copy the files into the directory you Web site points to, fire up your browser and enter your Web site address and the installation

Re: [R] smooth.spline

2008-07-20 Thread Spencer Graves
in line Duncan Murdoch wrote: On 20/07/2008 11:11 AM, Spencer Graves wrote: Are you aware that there are many different kinds of splines? With spline and splinefun, you can use method = fmm (Forsyth, Malcolm and Moler), natural, or periodic. I'm not familiar with fmm, but it seems

Re: [R] Access to values of function arguments

2008-07-20 Thread Prof Brian Ripley
See ?deparse . E.g. (with several stylistic improvements) func - function(a) cat(sprintf(Anova for variable %s\n, sQuote(deparse(substitute(a) func(Age) Note that you expliciltly do not want the *vaiue* of 'a', but the symbol passed. That is non-standard behaviour, and you

Re: [R] Access to values of function arguments

2008-07-20 Thread Marc Schwartz
on 07/20/2008 08:42 AM willemf wrote: Does anyone know of good reading material about the following? The R language definition does not appear to explicitly address my problem (maybe I misread that document?) I have a function definition: func(a) cat(Anova for variable ,a) What I wish to

[R] Indicator Kriging?

2008-07-20 Thread Sascha Bellaire
Hello All! I like to do some indicator kriging with R. So far I used geoR for simple and ordinary kriging. Does anybody know which package I should use? Thanks for your help! Sascha! -- Jetzt dabei sein: http://www.shortview.de/[EMAIL PROTECTED] __

[R] fill in area between 2 lines with a color

2008-07-20 Thread David Freedman
Hi - I'd like to have the area between 2 lines on a x-y plot be filled with grey, but I haven't had any luck using polygon or rect. (In reality, I'd like to do this for twice - once for a low group and once for a high group - and then I'd like to plot a set of data points for a 'normal' group

[R] Conditionally Updating Lattice Plots

2008-07-20 Thread Bryan Hanson
Hi All... I can¹t seem to find an answer to this in the help pages, archives, or Deepayan¹s Lattice Book. I want to do a Lattice plot, and then update it, possibly more than once, depending upon some logical options. Code below; it produces a second plot page when the second update is called,

[R] Erro updating HTML package descriptions in packages.html

2008-07-20 Thread José Augusto Jr.
Dear all, I have just installed the new version of R 2.7.1 and when i first instaled some packages it asked me to create a personal directory. It installed the packages, but not the html help page (packages.html) The downloaded packages are in

Re: [R] fill in area between 2 lines with a color

2008-07-20 Thread Dimitris Rizopoulos
try the following: age - 1:10 y.low - rnorm(length(age), 150, 25) + 10*age y.high - rnorm(length(age), 250, 25) + 10*age plot(age,y.high,type = 'n', ylim = c(100, 400), ylab = 'Y Range', xlab = 'Age (years)') lines(age, y.low, col = 'grey') lines(age, y.high, col = 'grey') polygon(c(age,

Re: [R] fill in area between 2 lines with a color

2008-07-20 Thread Marc Schwartz
on 07/20/2008 11:34 AM David Freedman wrote: Hi - I'd like to have the area between 2 lines on a x-y plot be filled with grey, but I haven't had any luck using polygon or rect. (In reality, I'd like to do this for twice - once for a low group and once for a high group - and then I'd like to

Re: [R] Conditionally Updating Lattice Plots

2008-07-20 Thread Gabor Grothendieck
Try this: library(lattice) fancy.lm - function(x, y, fit = TRUE, resid = TRUE){ model - lm(y ~ x) y.pred - predict(model) # Compute residuals for plotting res.x - as.vector(rbind(x, x, rep(NA,length(x # NAs induce breaks in line res.y - as.vector(rbind(y,

Re: [R] Erro updating HTML package descriptions in packages.html

2008-07-20 Thread Uwe Ligges
José Augusto Jr. wrote: Dear all, I have just installed the new version of R 2.7.1 and when i first instaled some packages it asked me to create a personal directory. It installed the packages, but not the html help page (packages.html) The downloaded packages are in

Re: [R] Erro updating HTML package descriptions in packages.html

2008-07-20 Thread Gabor Grothendieck
Read the VISTA HOW TO section of this page: http://batchfiles.googlecode.com On Sun, Jul 20, 2008 at 12:48 PM, José Augusto Jr. [EMAIL PROTECTED] wrote: Dear all, I have just installed the new version of R 2.7.1 and when i first instaled some packages it asked me to create a personal

Re: [R] Erro updating HTML package descriptions in packages.html

2008-07-20 Thread José Augusto Jr.
Dear all, Unfortunately, i´m running as administrator. So, i cannot run R in an upper level than this one i am already running. jamaj 2008/7/20 Gabor Grothendieck [EMAIL PROTECTED]: Read the VISTA HOW TO section of this page: http://batchfiles.googlecode.com On Sun, Jul 20, 2008 at 12:48

Re: [R] Matching Up Values

2008-07-20 Thread Steve Murray
Hmm, I'm having a fair few difficulties using 'merge' now. I managed to get it to work successfully before, but in this case I'm trying to shorten (as oppose to lengthen as before) a file in relation to a 'master' file. These are the commands I've been using, followed by the dimensions of the

[R] asp and ylim

2008-07-20 Thread David Epstein
#See David Williams' book Weighing the odds, p286 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) ylength - length(y) ybarv - rep(ybar, ylength) x - 1:ylength plot(x,y,asp=1,xlab=position,ylab=ybar,type=n,ylim=c(-1,1)) segments(x[1], ybar, x[ylength],

Re: [R] Erro updating HTML package descriptions in packages.html

2008-07-20 Thread Gabor Grothendieck
Just in case you are mistaken try the suggestion given already. If you determine that that does not work (and are not just guessing that it won't work) then in Windows Explorer, right click packages.html Properties Security and set the security levels appropriately. Not sure but you may have

[R] Off topic: SS formulae for 3-way repeated measure anova (for when aov() fails)

2008-07-20 Thread Mike Lawrence
Pursuant to a prior on topic thread (http://tolstoy.newcastle.edu.au/R/e4/help/08/07/17192.html ) where I found I could not use AOV to perform an anova on my large data set, I'm now trying to code the analysis by hand so to speak. However, as demonstrated below, when comparing my attempt to

Re: [R] Access to values of function arguments

2008-07-20 Thread willemf
Dear Mike and Brian, Thank you very much, this solves my immediate problem. Thanks for your time very much. I will do the reading on those two functions. I have looked for books that deal with the more programmatic aspects of R instead of the statistical side (e.g. dealing with R objects,

[R] Erro: cannot allocate vector of size 216.0 Mb

2008-07-20 Thread José Augusto Jr.
Please, I have a 2GB computer and a huge time-series to embedd, and i tried increasing memory.limit() and memory.size(max=TRUE), but nothing. Just before the command: memory.size(max=TRUE) [1] 13.4375 memory.limit() [1] 1535.875 gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells

Re: [R] Non-linearly constrained optimisation

2008-07-20 Thread Hans W. Borchers
Please have a look at the 'Rdonlp2' package at http://arumat.net/Rdonlp2/. It provides non-linear optinization with nonlinear constraints, so it may be exactly what you are looking for. Whether this algorithm is powerful enough for your task has to be seen. There are examples on the Web page

[R] enumerate subsets

2008-07-20 Thread lamack lamack
Dear all, is there a R function that enumerate a partition of a vector of size n? (of course for n not very large). I would like enumerate all the (2 power n)-1 sub-sets. (2 power n)-1 since (2 power n) includes de empty subset. Best Regards. ps. It is not a homework. I never posted homework

Re: [R] Access to values of function arguments

2008-07-20 Thread jim holtman
Check out S Programming by Venables Ripley. On Sun, Jul 20, 2008 at 3:02 PM, willemf [EMAIL PROTECTED] wrote: Dear Mike and Brian, Thank you very much, this solves my immediate problem. Thanks for your time very much. I will do the reading on those two functions. I have looked for books

Re: [R] asp and ylim

2008-07-20 Thread Rolf Turner
On 21/07/2008, at 5:27 AM, David Epstein wrote: #See David Williams' book Weighing the odds, p286 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) ylength - length(y) ybarv - rep(ybar, ylength) x - 1:ylength

Re: [R] Erro: cannot allocate vector of size 216.0 Mb

2008-07-20 Thread jim holtman
What is huge? How big is it and what are the commands you are trying to use? Have you tried a smaller size to see how much memory is being used (do a 'gc' before and after). Depending on what you are trying to do, you may have memory fragmented. What are the sizes of all the other objects that

Re: [R] enumerate subsets

2008-07-20 Thread Peter Dalgaard
lamack lamack wrote: Dear all, is there a R function that enumerate a partition of a vector of size n? (of course for n not very large). I would like enumerate all the (2 power n)-1 sub-sets. (2 power n)-1 since (2 power n) includes de empty subset. Best Regards. ps. It is not a homework. I

Re: [R] enumerate subsets

2008-07-20 Thread jim holtman
Can you give a small example of what you data looks like and what you think the output should be. Have you looked at 'combn'? On Sun, Jul 20, 2008 at 4:33 PM, lamack lamack [EMAIL PROTECTED] wrote: Dear all, is there a R function that enumerate a partition of a vector of size n? (of course

Re: [R] enumerate subsets

2008-07-20 Thread Gabor Grothendieck
Try this replacing letters[1:4] with your set: do.call(expand.grid, as.data.frame(rbind(letters[1:4], NA))) V1 V2 V3 V4 1 abcd 2 NAbcd 3 a NAcd 4 NA NAcd 5 ab NAd 6 NAb NAd 7 a NA NAd 8 NA NA NAd 9

Re: [R] asp and ylim

2008-07-20 Thread Gabor Grothendieck
Try lattice: library(lattice) xyplot(y ~ x, ylim = c(0.5, 0.7), aspect = iso) On Sun, Jul 20, 2008 at 5:58 PM, David Epstein [EMAIL PROTECTED] wrote: On 20 Jul, 2008, at 22:00, Rolf Turner wrote: I just tried set.seed(42) x - runif(10) y - runif(10)

Re: [R] asp and ylim

2008-07-20 Thread Prof Brian Ripley
Take a look at eqscplot() in package MASS for a different approach. You last para forgets that once you have set the device region and the margins the physical plot region and hence its aspect ratio is determined -- see the figures in 'An Introduction to R'. On Sun, 20 Jul 2008, David

Re: [R] asp and ylim

2008-07-20 Thread Paul Smith
On Sun, Jul 20, 2008 at 11:14 PM, Gabor Grothendieck [EMAIL PROTECTED] wrote: Try lattice: library(lattice) xyplot(y ~ x, ylim = c(0.5, 0.7), aspect = iso) Alternatively, set.seed(42) x - runif(10) y - runif(10) plot(x[(y=0.5) (y=0.7)],y[(y=0.5) (y=0.7)],ylim=c(0.5,0.7),asp=1) Paul

[R] Sum efficiently from large matrix according to re-occuring levels of factor?

2008-07-20 Thread Ralph S.
Hi, I am trying to calculate the sum for each occurrence of the level of a factor in a very large matrix. In addition, I want to save that sum together with the information of the level of the factor and the level of a second factor. My matrix looks like this:

[R] coin package (conditional inference / permutation): parameter teststat

2008-07-20 Thread Paulo Barata
Dear R-list members, This is in fact a question about statistics, not directly about the R software. The coin package, for conditional inference through permutation methods, has as it main function the function independence_test. One of its parameters is teststat, about which the package

Re: [R] Sum efficiently from large matrix according to re-occuring levels of factor?

2008-07-20 Thread hadley wickham
On Sun, Jul 20, 2008 at 4:16 PM, Ralph S. [EMAIL PROTECTED] wrote: Hi, I am trying to calculate the sum for each occurrence of the level of a factor in a very large matrix. In addition, I want to save that sum together with the information of the level of the factor and the level of a

Re: [R] Sum efficiently from large matrix according to re-occuring levels of factor?

2008-07-20 Thread hadley wickham
On Sun, Jul 20, 2008 at 4:47 PM, hadley wickham [EMAIL PROTECTED] wrote: On Sun, Jul 20, 2008 at 4:16 PM, Ralph S. [EMAIL PROTECTED] wrote: Hi, I am trying to calculate the sum for each occurrence of the level of a factor in a very large matrix. In addition, I want to save that sum together

Re: [R] TeachingDemos question: my.symbols() alignment problems in complicated layout

2008-07-20 Thread Paul Murrell
Hi [EMAIL PROTECTED] wrote: Hello, After usefull suggestions by Paul Murrell, i have been trying to use my.symbols to plot arrows of varying angles on my plot in order to create a time series of wind direction... however,i have been unable to figure out how the allignment of symbols

Re: [R] TeachingDemos question: my.symbols() alignment problems in complicated layout

2008-07-20 Thread hadley wickham
Here are a couple of options: (i) use the 'gridBase' package and do these arrow annotations using the 'grid' package, which allows you to control coordinate systems in a more rational manner. There's an example (perhaps slightly more complicated than you need) in:

Re: [R] smooth.spline

2008-07-20 Thread rkevinburton
Actually that was my next question. From the books that I have I see a natural spline and a clamped spline. I am assuming that natural (Umerical Analysis, Burden, et. all.) cooresponds to 'R''s natural method. I am not clear on what a clamped spline cooresponds to (fmm or perodic). Or what the

[R] Lattice Version of grconvertX or variant on panel.text?

2008-07-20 Thread Bryan Hanson
Still playing with Lattice... I want to use panel.text(x, y etc) but with x and y in plot coordinates (0,1), not user coordinates. I think if I had this problem with traditional graphics, I could use grconvertX to make the change. I did come across convertX {grid} but this doesn't seem to be

Re: [R] Lattice Version of grconvertX or variant on panel.text?

2008-07-20 Thread hadley wickham
On Sun, Jul 20, 2008 at 6:03 PM, Bryan Hanson [EMAIL PROTECTED] wrote: Still playing with Lattice... I want to use panel.text(x, y etc) but with x and y in plot coordinates (0,1), not user coordinates. I think if I had this problem with traditional graphics, I could use grconvertX to make

Re: [R] Sum efficiently from large matrix according to re-occuring levels of factor?

2008-07-20 Thread jim holtman
Does this do what you want: # following up on another idea that was presented # where are the breaks dataBreaks - cumsum(c(0, (diff(x[, 2] + x[, 1] * max(x[, 2])) != 0))) # sum up column 3 and output the first two columns with the indices result - lapply(split(seq(nrow(x)), dataBreaks),

Re: [R] Lattice Version of grconvertX or variant on panel.text?

2008-07-20 Thread Bryan Hanson
Never mind, I just hard-coded it using ratios. Simpler than I thought. Thanks, Bryan On 7/20/08 9:03 PM, Bryan Hanson [EMAIL PROTECTED] wrote: Still playing with Lattice... I want to use panel.text(x, y etc) but with x and y in plot coordinates (0,1), not user coordinates. I think if I

Re: [R] Sum efficiently from large matrix according to re-occuring levels of factor?

2008-07-20 Thread Ralph S.
yes - thank you very much! slowly getting to the full power of R . . . Date: Sun, 20 Jul 2008 21:21:35 -0400 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [R] Sum efficiently from large matrix according to re-occuring levels of factor?

Re: [R] Lattice Version of grconvertX or variant on panel.text?

2008-07-20 Thread Gabor Grothendieck
Use grid.text instead: library(lattice) library(grid) xyplot(demand ~ Time, BOD, panel = function(...) { panel.xyplot(...) grid.text(Some text, .1, .1) # near lower left }) On Sun, Jul 20, 2008 at 9:03 PM, Bryan Hanson [EMAIL PROTECTED] wrote: Still playing with Lattice... I want to

[R] RODBC - problems using odbcDriverConnect without DSN

2008-07-20 Thread Josiah Walker
Hi, I'm trying to use RODBC without having to set up a DSN, using hte direct connection string in odbcDriverConnect. My connection attempt looks something like: odbcDriverConnect(connection = SERVER=localhost;DRIVER={/usr/lib/odbc/libmyodbc.so};DATABASE=myDB;UID=reader;PASSWORD=insecure;)