[R] Clustering with clara

2010-01-14 Thread pacomet
Hello everyone I am trying to use CLARA method for finding clusters in my spatial surface temperature data and noticed one problem. My data are in the form lat,lon,temperature. I extract lat,lon and cluster number for each point in the dataset. When I plotted a map of cluster numbers I found

[R] Giving parameters from shell

2010-01-14 Thread cihan inan
Hi I want to give parameters for my function from the shell. I mean I defined a function like these: work1.R : myfunc - function(x,y) { z = x + y z } and now I want to use shell to give parameters like ./work1.R (3,5) to get sum 8. so what should I do? [[alternative HTML version

[R] chron, xts and zoo

2010-01-14 Thread simeon duckworth
dear r folks i am a bit puzzled about how to use chron as an index xts and why it differs from zoo. in this example, why can i index zoo but not xts x-1:23 time.of.day - times(paste(x,:0:0,sep=),format=h:m:s) day - dates(4/8/90) period - chron(dates=day,times=time.of.day) xts(1:23,period)

Re: [R] Updated comparison table for SAS-SPSS Add-ons and R Functions

2010-01-14 Thread Barry Rowlingson
On Thu, Jan 14, 2010 at 12:39 AM, Muenchen, Robert A (Bob) muenc...@utk.edu wrote: One of the things I updated was to *remove* the now-obsolete PASW! Since IBM bought the company, they did away with that and renamed things IBM SPSS See the list at:

Re: [R] Online R documentation

2010-01-14 Thread Karl Ove Hufthammer
On Fri, 8 Jan 2010 16:35:25 +0100 Karl Ove Hufthammer k...@huftis.org wrote: Well, I was thinking of better integration with the help pages, e.g., having each image appear right after the code that generated it, having larger images (perhaps at approx. the default window size for graphs in

[R] Barchart bar lengths not proportionate

2010-01-14 Thread Rex C. Eastbourne
When I use barchart (with default formatting options), I get bars whose lengths/heights are not proportional to their value. For example: http://drop.io/wbagm6s/asset/capture-png Many of the values in this chart are 1; however, because the blue bars extend to the left of the 0 tick mark, those

Re: [R] Online R documentation

2010-01-14 Thread Jim Lemon
On 01/14/2010 07:44 PM, Karl Ove Hufthammer wrote: On Fri, 8 Jan 2010 16:35:25 +0100 Karl Ove Hufthammerk...@huftis.org wrote: Well, I was thinking of better integration with the help pages, e.g., having each image appear right after the code that generated it, having larger images (perhaps at

Re: [R] Giving parameters from shell

2010-01-14 Thread Paul Hiemstra
cihan inan wrote: Hi I want to give parameters for my function from the shell. I mean I defined a function like these: work1.R : myfunc - function(x,y) { z = x + y z } and now I want to use shell to give parameters like ./work1.R (3,5) to get sum 8. so what should I do?

[R] Logical function

2010-01-14 Thread Olivier Deckmyn
Dear all, I'm learning R, with a classical programming background. Some hours were necessary for me to programm the vector way. Here is my dataset : ds - data.frame( st=runif(100), st=runif(100),s1=runif(100),mp=runif(100)) I need to generate 2 new variables. First was easy : ds$n1 -

[R] How to color a splom?

2010-01-14 Thread Marius Hofert
Dear R-Users, I would like to color the data in a splom according to their position in the matrix, i.e. I would like to have all data shown in the upper left corner to be blue, all entries below that to be black, and the data to the right to be all red. I tried to color the splom with the

Re: [R] How to install old randomForest?

2010-01-14 Thread Uwe Ligges
Note that all these instructions are outdated since there is no chm help support for R-2.10.x, for example. Please use the R Installation and Administration manual as the reference. Best wishes, Uwe Ligges On 14.01.2010 06:10, David Scott wrote: Julian Ramirez wrote: Hi Ted, You need to

Re: [R] Logical function

2010-01-14 Thread Romain Francois
Here's one way : ds - data.frame( st = runif(100), s0=runif(100), s1=runif(100),s2=runif(100),mp=runif(100)) ds - within( ds, { n1 - 1*( st0.38 ) n2 - numeric( length( st ) ) n2[ is.na(st) | st = 0.38 ] - .25 n2[ s0 == mp ] - .25 n2[ s2 == mp ]

Re: [R] Better way than an ifelse statement?

2010-01-14 Thread Henrique Dallazuanna
Try this: example$X3 - sapply(example$X2, switch, -3, -1, 1, 3) On Thu, Jan 14, 2010 at 5:05 AM, Joshua Wiley jwiley.ps...@gmail.com wrote: Hello All, I am trying to create a column of weights based off of factor levels from another column.  I am using the weights to calculate L scores.

Re: [R] Clustering with clara

2010-01-14 Thread Christian Hennig
Dear Paco, as far as I know, there is no such problem with clara, but I may be wrong. However, in order to help you (though I'm not sure whether I'll be able to do that), we'd need to understand precisely what you were doing in R and how your data looks like (code and data; you can show us a

Re: [R] Better way than an ifelse statement?

2010-01-14 Thread Romain Francois
Or this ; example$X3 - c(-3, -1, 1, 3)[ example$X2 ] Romain On 01/14/2010 11:55 AM, Henrique Dallazuanna wrote: Try this: example$X3- sapply(example$X2, switch, -3, -1, 1, 3) On Thu, Jan 14, 2010 at 5:05 AM, Joshua Wileyjwiley.ps...@gmail.com wrote: Hello All, I am trying to create a

Re: [R] Better way than an ifelse statement?

2010-01-14 Thread Henrique Dallazuanna
This works too: example$X3 - example$X2 * 2 - 5 On Thu, Jan 14, 2010 at 8:55 AM, Henrique Dallazuanna www...@gmail.com wrote: Try this: example$X3 -  sapply(example$X2, switch, -3, -1, 1, 3) On Thu, Jan 14, 2010 at 5:05 AM, Joshua Wiley jwiley.ps...@gmail.com wrote: Hello All, I am

Re: [R] R package dependencies

2010-01-14 Thread Colin Millar
Thanks Gabor, Are you or anyone aware if there is a text list of of package contents? The only way i have managed to get information like the number of dlls per package is by downloading the zip file to a tempporary file and listing its contents via unzip(..., list = TRUE). However,

[R] Windows Shell: R Gui Here

2010-01-14 Thread Dieter Menne
Some years ago I published the reg string here to start RGui in a selected Windows directory via right key click without keeping a cmd window open. That string no longer works in Vista/Windows 7. Below is the alternative. It assumes that rgui is on your path, or that you have Gabor's rbatch

[R] Is it possible to create the genetic code circle graph ?

2010-01-14 Thread Tal Galili
Hello dear R help group, Can any one suggest me of a way of making this: http://portal.techhigh.us/Teachers/lauritsenk/PublishingImages/genetic%20code.jpg Using R ? Thanks! Tal http://portal.techhigh.us/Teachers/lauritsenk/PublishingImages/genetic%20code.jpg Contact

[R] Need help with R-tasks

2010-01-14 Thread Nenita
Hello everybody, I have got some problems concerning my tasks using R. I have got a true regression function for a double-log model. I also have got two samples n1=100 and n2=400 which are saved in X1 and Y1, and in X2 and Y2 respectively. Now I have to display the original data and the

[R] To add text in a matrix

2010-01-14 Thread carferper
Dear colleagues, I would need to add text (some rows of information) in a matrix. For example, given this matrix 1 2 3 4 5 6 7 8 9 I would need to add this info: THIS IS AN EXAMPLE OF a 3x3 MATRIX 1 2 3 4 5 6 7 8 9 I have been looking for a function that works similar to fopen in matlab,

[R] Fixed size permutations

2010-01-14 Thread Nick Fankhauser
I'm using functions to return a matrix of all permutations of a specified size from a larger list for predictor selection. For each predictor size I use a seperate function like this: bag2 - function(n) { rl - c() for (i1 in seq(n)) { for (i2 in seq(n)) { if

Re: [R] To add text in a matrix

2010-01-14 Thread Ted Harding
On 14-Jan-10 10:04:27, carfer...@alum.us.es wrote: Dear colleagues, I would need to add text (some rows of information) in a matrix. For example, given this matrix 1 2 3 4 5 6 7 8 9 I would need to add this info: THIS IS AN EXAMPLE OF a 3x3 MATRIX 1 2 3 4 5 6 7 8 9 I have

Re: [R] Advantages of using SQLite for data import in comparison to csv files

2010-01-14 Thread Gabor Grothendieck
sqldf is layered on top of RSQLite. Its not a separate facility. On Thu, Jan 14, 2010 at 2:12 AM, Juliet Jacobson julietjacob...@aim.com wrote: Thanks for your answer. I hadn't found this possibility by web search. Since sqldf also allows the import of tables from csv files, complex SELECT

Re: [R] Updated comparison table for SAS-SPSS Add-ons and R Functions

2010-01-14 Thread Liviu Andronic
Hello On 1/13/10, Muenchen, Robert A (Bob) muenc...@utk.edu wrote: http://r4stats.com/add-on-modules and I would very much appreciate any feedback you might have on it. Perhaps add latticist and playwith to the list of Graphics, Interactive? Regards Liviu

Re: [R] To add text in a matrix

2010-01-14 Thread Henrique Dallazuanna
You can use the Matrix package: Matrix::Matrix(1:9, ncol = 3) On Thu, Jan 14, 2010 at 8:04 AM, carfer...@alum.us.es wrote: Dear colleagues, I would need to add text (some rows of information) in a matrix. For example, given this matrix 1 2 3 4 5 6 7 8 9 I would need to add this

Re: [R] Updated comparison table for SAS-SPSS Add-ons and R Functions

2010-01-14 Thread Liviu Andronic
On 1/14/10, Liviu Andronic landronim...@gmail.com wrote: Perhaps add latticist and playwith to the list of Graphics, Interactive? .. and remove latticist from Graphics, Static. Also, add rattle to Graphical user interfaces? Liviu __

[R] memDecompress and zlib compressed base64 encoded string

2010-01-14 Thread Johannes Graumann
Hi, I have zlib compressed strings (example is attached) and would like to decompress them using memDecompress ... I try this: connection - file(compressed.txt,r) compressed - readLines(connection) memDecompress(as.raw(compressed),type=g) Error in memDecompress(as.raw(compressed), type = g)

Re: [R] HTML translation problem in R-2.10.1

2010-01-14 Thread Duncan Murdoch
On 14/01/2010 11:20 AM, Jim Lemon wrote: Hi Core Team, I received an email about a problem with the help on the plotrix package. Apparently the \link tags in the help pages were showing up as literal text. I couldn't see this problem, nor any problem with the Rd files. Since the plotrix

[R] plot type any symbols?

2010-01-14 Thread Trafim Vanishek
Dear all, I have a question is there a possibility to plot points with different symbols like stars, crosses? I looked at different types for plot command and didn't find anything like that. Thanks a lot. [[alternative HTML version deleted]]

Re: [R] plot type any symbols?

2010-01-14 Thread Henrique Dallazuanna
See pch argument: plot(1:10, pch = 1:10) On Thu, Jan 14, 2010 at 11:22 AM, Trafim Vanishek rdapam...@gmail.com wrote: Dear all, I have a question is there a possibility to plot points with different symbols like stars, crosses? I looked at different types for plot command and didn't find

Re: [R] plot type any symbols?

2010-01-14 Thread D Kelly O'Day
Trafim Use the pch= argument within plot(). Try ?points to get details. Trafim wrote: Dear all, I have a question is there a possibility to plot points with different symbols like stars, crosses? I looked at different types for plot command and didn't find anything like that.

Re: [R] Better way than an ifelse statement?

2010-01-14 Thread Joshua Wiley
Hello, Thanks for all of your responses. I got a lot of great options that work. Thanks again! Joshua __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] To add text in a matrix

2010-01-14 Thread Matthieu Dubois
You can also use the comment() function to add comments to any kind of R object. Matthieu Dubois __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] R package dependencies

2010-01-14 Thread Uwe Ligges
For the original question: what are a packages dependencies tools:::package.dependencies(available.packages()) what are a packages reverse dependencies tools:::dependsOnPkgs(available.packages()[,1]) does a package contain a dll If the package has been installed already and you

Re: [R] Fixed size permutations

2010-01-14 Thread Peter Ehlers
Nick Fankhauser wrote: I'm using functions to return a matrix of all permutations of a specified size from a larger list for predictor selection. For each predictor size I use a seperate function like this: bag2 - function(n) { rl - c() for (i1 in seq(n)) { for (i2 in seq(n)) {

Re: [R] Fixed size permutations

2010-01-14 Thread Henrique Dallazuanna
Try this: v - 1:5 n - 2 t(subset(do.call(expand.grid, replicate(n, v, FALSE))[n:1], Var1 != Var2)) On Thu, Jan 14, 2010 at 9:51 AM, Nick Fankhauser li...@nyk.ch wrote: I'm using functions to return a matrix of all permutations of a specified size from a larger list for predictor selection.

Re: [R] Fixed size permutations

2010-01-14 Thread Peter Ehlers
Small modification below. Peter Ehlers wrote: Nick Fankhauser wrote: I'm using functions to return a matrix of all permutations of a specified size from a larger list for predictor selection. For each predictor size I use a seperate function like this: bag2 - function(n) { rl - c()

Re: [R] Barchart bar lengths not proportionate

2010-01-14 Thread Walmes Zeviani
Rex, I think this problem can be solved using xlim()/ylim() argument. Look at the follwing code: require(lattice) da - expand.grid(A=c(a,b), x=1:4) da$y - c(1,5,6,3,2,0,6,0) barchart(y~x|A, data=da, horizontal=FALSE) barchart(y~x|A, data=da, horizontal=FALSE, ylim=c(0,

Re: [R] Barchart bar lengths not proportionate

2010-01-14 Thread Deepayan Sarkar
On Thu, Jan 14, 2010 at 1:16 AM, Rex C. Eastbourne rex.eastbou...@gmail.com wrote: When I use barchart (with default formatting options), I get bars whose lengths/heights are not proportional to their value. For example: http://drop.io/wbagm6s/asset/capture-png Many of the values in this

Re: [R] R ON Mac

2010-01-14 Thread Corey Sparks
Hi, it appears that your corrdinates contain commas, instead of decimal points, R sees the commas and immediatly thinks the data are text, you should replace the commas with decimal points in a text editor. Corey gedasg wrote: hello, I have strange error.

Re: [R] R ON Mac

2010-01-14 Thread Peter Dalgaard
Corey Sparks wrote: Hi, it appears that your corrdinates contain commas, instead of decimal points, R sees the commas and immediatly thinks the data are text, you should replace the commas with decimal points in a text editor. Alternatively, set dec=, or use read.delim2() (if the file is

Re: [R] R ON Mac

2010-01-14 Thread Adelchi Azzalini
On Thu, 14 Jan 2010 07:07:49 -0800 (PST), Corey Sparks wrote: CS CS Hi, it appears that your corrdinates contain commas, instead of CS decimal points, R sees the commas and immediatly thinks the data CS are text, you should replace the commas with decimal points in a CS text editor. CS or

Re: [R] FW: Problems connecting with MySQL using odbcDriverConnect (RODBC package) on Linux

2010-01-14 Thread Marcus, Jeffrey
Orvalho: Thanks for pointing our RMySQL. The reason is that we have similar data stored in both SQL server and MySQL databases and I want to reuse code as much as possible. Jeff -Original Message- From: Orvalho Augusto [mailto:orvaq...@gmail.com] Sent: Wednesday, January 13, 2010

Re: [R] R package dependencies

2010-01-14 Thread Colin Millar
Thanks guys! The tools functions are very useful, and also the the utils:::.clean_up_dependencies hiding in there, which I had a managed to do myself but in far more lines! I think I am going to download each zip file one by one to find if there are dlls - which sounds like an overnight job to

Re: [R] R ON Mac

2010-01-14 Thread Don MacQueen
However, for there to be a difference between Mac and PC means that something else is going on. I would guess that the PC is set to a LOCALE for which , is the default decimal separator, and the Mac is set to a LOCALE for which . is the default decimal separator. (If locale settings affect

Re: [R] To add text in a matrix

2010-01-14 Thread Don MacQueen
In R, see ?connectionfor information about functions similar to matlab's fopen. If what you're trying to do is write information and the matrix to a file, then you can at least get started with something along the lines of: cat('This is my information\nand a second line of

Re: [R] R package dependencies

2010-01-14 Thread James W. MacDonald
Hi Colin, The pkgDepTools package from Bioconductor will help with question #1: http://bioconductor.org/packages/2.5/bioc/html/pkgDepTools.html I am not positive on this, but I believe this package is also used to determine the reverse dependencies that would be listed on that page if there

Re: [R] R ON Mac

2010-01-14 Thread Peter Dalgaard
Don MacQueen wrote: However, for there to be a difference between Mac and PC means that something else is going on. I would guess that the PC is set to a LOCALE for which , is the default decimal separator, and the Mac is set to a LOCALE for which . is the default decimal separator. (If

[R] Extracting data from a list of matrices

2010-01-14 Thread Hubert Colt
Hi, Apologies in advance for the basic nature of my question. I am still very much a rookie when it comes to R. Having googled it, checked Nabble and trial/error to the best of my ability, I have yet to find an easy solution. I am currently working with a list of 5x5 matrices, and want to

Re: [R] Extracting data from a list of matrices

2010-01-14 Thread Henrique Dallazuanna
Try this: lapply(l, '[', 1, 1) On Thu, Jan 14, 2010 at 2:22 PM, Hubert Colt hubert.c...@gmail.com wrote: Hi, Apologies in advance for the basic nature of my question. I am still very much a rookie when it comes to R. Having googled it, checked Nabble and trial/error to the best of my

[R] Mode of a histogram

2010-01-14 Thread Michael Doube
Hi all I recently Googled to find out how to get the mode from my continuous data in R, and came up with this ancient thread from the archives: http://tolstoy.newcastle.edu.au/R/help/99b/1319.html But sorting is very inefficient if you have lots of data, so can I propose this method: h -

Re: [R] Extracting data from a list of matrices

2010-01-14 Thread Hubert Colt
Excellent! That did the trick. Thank you very much. On Thu, Jan 14, 2010 at 5:27 PM, Henrique Dallazuanna www...@gmail.comwrote: Try this: lapply(l, '[', 1, 1) On Thu, Jan 14, 2010 at 2:22 PM, Hubert Colt hubert.c...@gmail.com wrote: Hi, Apologies in advance for the basic nature of

Re: [R] Mode of a histogram

2010-01-14 Thread Dieter Menne
Michael Doube-3 wrote: But sorting is very inefficient if you have lots of data, so can I propose this method: Mmm. Good to know that sorting is very inefficient. Dieter -- View this message in context: http://n4.nabble.com/Mode-of-a-histogram-tp1014012p1014019.html Sent

[R] R ON Mac

2010-01-14 Thread gedasg
hello, I have strange error. gyliai-read.table(file.choose(),header=T) summary(gyliai) xy gylis 307577,08: 1 6124296,56: 1 3,00 : 59 308613,01: 1 6124353,50: 1 2,80 : 51 313800,45: 1 6124530,65: 1 3,10 : 36 313840,17: 1

[R] paired repeated measurements

2010-01-14 Thread Sven Wirthner
I have the following problem: I measured co2 on 6 paired sites (one grubbed and one non-grubbed fence per site - grubbing = treatment). These measurements I repeated 15 times over 2 years. So, now my problem is how to analyze these data. I tried the following model:

Re: [R] R ON Mac

2010-01-14 Thread gedasg
Thanks Corey! I change that, and its start working. Best, Gedas Corey Sparks wrote: Hi, it appears that your corrdinates contain commas, instead of decimal points, R sees the commas and immediatly thinks the data are text, you should replace the commas with decimal points in a text

Re: [R] plot type any symbols?

2010-01-14 Thread Greg Snow
Also look at the my.symbols function in the TeachingDemos package for more options. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-

Re: [R] Barchart bar lengths not proportionate

2010-01-14 Thread S Ellison
I think you should rather look at the origin= parameter in barchart. See ?panel.barchart for a discussion of this exact problem: origin: the origin for the bars. For grouped displays with 'stack = TRUE', this argument is ignored and the origin set to 0. Otherwise, defaults

[R] lattice dotplot with missing levels in factor variable

2010-01-14 Thread Boris.Vasiliev
Hi, I am trying to create a dotplot where each panel shows levels vs. responses; the levels are sorted by responses but levels vary from one panel to another. However, I run into problems with controlling the y-limits and y-labels. In particular, suppose I have a data frame rsp -

Re: [R] Updated comparison table for SAS-SPSS Add-ons and R Functions

2010-01-14 Thread Muenchen, Robert A (Bob)
Hi Liviu, Thanks for those suggestions. I've made the changes and added you to the list of contributors. Cheers, Bob -Original Message- From: Liviu Andronic [mailto:landronim...@gmail.com] Sent: Thursday, January 14, 2010 7:06 AM To: Muenchen, Robert A (Bob) Cc:

Re: [R] Barchart bar lengths not proportionate

2010-01-14 Thread Rex C. Eastbourne
That fixed it! Thanks to all who replied. On Thu, Jan 14, 2010 at 9:13 AM, S Ellison s.elli...@lgc.co.uk wrote: I think you should rather look at the origin= parameter in barchart. See ?panel.barchart for a discussion of this exact problem: origin: the origin for the bars. For grouped

Re: [R] How can I store the results

2010-01-14 Thread Arnaud Mosnier
If you absolutely need a single file for each iteration, you can also include the iteration number into your output filename. for(i in 1:dim(your input data)[1]) { results- your calculation write.csv(results, paste(filename, _, i, sep=)) } Arnaud Date: Wed, 13 Jan 2010 15:59:37 +0100 From:

[R] extracting columns with same partial name

2010-01-14 Thread Martin Striz
Hi folks, I'm new to the list. I have a data file with 256 columns. Here's just a subset of names(data): [1] MOUSE BASEDATE1 PERCENTSLEEPTOT1 [4] PERCENTSLEEPNIGHT1 PERCENTSLEEPDAY1BOUTLENGTHTOT1 [7] BOUTLENGTHNITE1 BOUTLENGTHDAY1 BOUTTHRESTOTP1 [10]

Re: [R] extracting columns with same partial name

2010-01-14 Thread Henrique Dallazuanna
Try this: DF[,grep(BOUTLENGTHTOT, l)] On Thu, Jan 14, 2010 at 4:43 PM, Martin Striz mst...@gmail.com wrote: Hi folks, I'm new to the list. I have a data file with 256 columns.  Here's just a subset of names(data):  [1] MOUSE               BASEDATE1           PERCENTSLEEPTOT1  [4]

Re: [R] paired repeated measurements

2010-01-14 Thread Bert Gunter
Sven: 1. Try this question on the r-sig-mixwed-models list -- more likely to get good responses there, I think. 2. However, my less expert opinion is that you need a random fence within site term (each fence has it's own ID) co2 ~ treatment + time, rand = ~1|fence/site This assumes time is

Re: [R] extracting columns with same partial name

2010-01-14 Thread Peter Ehlers
Try dat[names(dat) %in% paste(BOUTLENGTHTOT, 1:17, sep=)] -Peter Ehlers Martin Striz wrote: Hi folks, I'm new to the list. I have a data file with 256 columns. Here's just a subset of names(data): [1] MOUSE BASEDATE1 PERCENTSLEEPTOT1 [4] PERCENTSLEEPNIGHT1

Re: [R] extracting columns with same partial name

2010-01-14 Thread Martin Striz
On Thu, Jan 14, 2010 at 1:57 PM, Dennis Murphy djmu...@gmail.com wrote: Try this: nms - paste(BOUTLENGTHTOT, 1:17, sep = ) data[, nms] On Thu, Jan 14, 2010 at 2:08 PM, Peter Ehlers ehl...@ucalgary.ca wrote: Try dat[names(dat) %in% paste(BOUTLENGTHTOT, 1:17, sep=)] Thanks! Both

Re: [R] lattice dotplot with missing levels in factor variable

2010-01-14 Thread Dennis Murphy
Hi: Based on an old R-help post, http://tolstoy.newcastle.edu.au/R/e2/help/06/09/1579.html I managed to get the desired plot with the following call: dotplot(reorder(lvl, rsp) ~ rsp | cat, data = xx, type = c('h', 'p'), layout = c(1, 2), scales = list(y = list(relation = 'free', rot =

Re: [R] Rollapply

2010-01-14 Thread Brecknock, Peter
For anyone who may be interested . Gabor Grothendieck suggested a link and then provided additional help resulting in the following. Any mistakes are mine. The code will allow you to build a rolling regression and to pass a (different) predictor to that regression model. # DATA

Re: [R] paired repeated measurements: Correction

2010-01-14 Thread Bert Gunter
Just realized that I got my nesting specification backwards. For fence in site, which is what I wanted, it should have been: co2 ~ treatment + time, rand = ~1|site/fence Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: bgunter Sent: Thursday, January 14,

Re: [R] lattice dotplot with missing levels in factor variable

2010-01-14 Thread Boris.Vasiliev
Great! Thank you very much. I missed the old R-help post but indeed this too simple ... Boris. From: Dennis Murphy [mailto:djmu...@gmail.com] Sent: Thursday, 14, January, 2010 14:40 PM To: Vasiliev b...@cefcom h...@ottawa-hull Cc: r-h...@stat.math.ethz.ch

Re: [R] Odp: a question about deleting rows

2010-01-14 Thread karena
thank all of you for the help. to Petr: thanks for the suggestion, I will read the R intro manual. :-) -- View this message in context: http://n4.nabble.com/a-question-about-deleting-rows-tp1013403p1014267.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] memDecompress and zlib compressed base64 encoded string

2010-01-14 Thread Prof Brian Ripley
On Thu, 14 Jan 2010, Johannes Graumann wrote: Hi, I have zlib compressed strings (example is attached) What is that file? Not gzip compression: gannet% file compressed.txt compressed.txt: ASCII text, with very long lines since gzip uses a magic header that 'file' knows about. And even if

[R] Error bars on barplots for only particular bars

2010-01-14 Thread kellys17
Hi, I have a data set that has columns bird.species, tree.speciesand count. I am investigating differences in tree species usge by two species of birds. Count is numerical and is a count of observations of bird species x using tree species x. For bird species A I have 3 different counts for

Re: [R] Error bars on barplots for only particular bars

2010-01-14 Thread Jim Lemon
On 01/15/2010 08:43 AM, kellys17 wrote: Hi, I have a data set that has columns bird.species, tree.speciesand count. I am investigating differences in tree species usge by two species of birds. Count is numerical and is a count of observations of bird species x using tree species x. For bird

Re: [R] Giving parameters from shell

2010-01-14 Thread cihan inan
I want to learn one more thing. You said args = commandArgs(TRUE) should I write this sentence in my function or out of my function area ? can you give me an example .r file ? 2010/1/14 Paul Hiemstra p.hiems...@geo.uu.nl cihan inan wrote: Hi I want to give parameters for my function from

Re: [R] Newbie mistakes saving images to files

2010-01-14 Thread Rex C. Eastbourne
On Thu, Jan 14, 2010 at 2:15 PM, Rex C. Eastbourne rex.eastbou...@gmail.com wrote: I am encountering problems using the png() function to save around 20 charts to separate files. My script is conceptually structured as follows: ### script png(Image %03d.png) # the following are calls to

Re: [R] Advantages of using SQLite for data import in comparison to csv files

2010-01-14 Thread Magnus Torfason
RSQLite is actually much more than a driver for data import. It basically allows any manipulation of SQLite databases, including reading, writing, or updating and munging data within the database. Regarding the original question of data import: I use csv and sqlite files interchangeably to

Re: [R] Giving parameters from shell

2010-01-14 Thread Don MacQueen
Try for yourself and see. (it's not difficult to try) For example, put the line in both places, followed by print(args) and see what happens. -Don At 11:49 PM +0200 1/14/10, cihan inan wrote: Content-Type: text/plain Content-Disposition: inline Content-length: 1496 I want to learn one more

[R] Newbie mistakes saving images to files

2010-01-14 Thread Rex C. Eastbourne
I am encountering problems using the png() function to save around 20 charts to separate files. My script is conceptually structured as follows: ### script png(Image %03d.png) # the following are calls to user-defined functions I wrote that call plot, barchart, etc. with special arguments.

Re: [R] HTML translation problem in R-2.10.1

2010-01-14 Thread Jim Lemon
On 01/15/2010 12:13 AM, Duncan Murdoch wrote: On 14/01/2010 11:20 AM, Jim Lemon wrote: Hi Core Team, I received an email about a problem with the help on the plotrix package. Apparently the \link tags in the help pages were showing up as literal text. I couldn't see this problem, nor any

Re: [R] Newbie mistakes saving images to files

2010-01-14 Thread Henrik Bengtsson
?png says: If you plot more than one page on one of these devices and do not include something like %d for the sequence number in file, the file will contain the last page plotted. meaning png(foo%03d.png, width=300, height=300); plot(1); plot(2); plot(3); dev.off(); generates foo001.png,

Re: [R] Newbie mistakes saving images to files

2010-01-14 Thread jim holtman
If you are using lattice, check out FAQ 7.22 On Thu, Jan 14, 2010 at 5:15 PM, Rex C. Eastbourne rex.eastbou...@gmail.com wrote: I am encountering problems using the png() function to save around 20 charts to separate files. My script is conceptually structured as follows: ### script

Re: [R] HTML translation problem in R-2.10.1

2010-01-14 Thread Duncan Murdoch
On 15/01/2010 6:24 AM, Jim Lemon wrote: On 01/15/2010 12:13 AM, Duncan Murdoch wrote: On 14/01/2010 11:20 AM, Jim Lemon wrote: Hi Core Team, I received an email about a problem with the help on the plotrix package. Apparently the \link tags in the help pages were showing up as literal text. I

[R] R/Rmetrics Conference Singapore, February 19/20

2010-01-14 Thread Diethelm Wuertz
2nd Announcement --- R/Rmetrics Computational Topics in Finance Conference National University of Singapore, February 19/20, 2009. --- www.rmetrics.org

[R] how do I test regime shift in R?

2010-01-14 Thread Michael
Hi all, Let's say I have a time series data. I would like to test online for regime shift, are there any R packages that can do that? Thanks a lot! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] advice/opinion on - vs = in teaching R

2010-01-14 Thread Erin Hodgess
Hi R People: I'm teaching a statistical computing class using R starting next week (yay!) and I have an opinion type question, please. I'm old school and use - in an assignment. However, I'm starting to see the = in the literature. Which should I use or does it matter, please? Thanks for your

[R] Sampling from a Postgres database

2010-01-14 Thread christiaan pauw
Hi Everybody Is there a way in which one can use the RPostgreSQL package to take a sample from a table in Postgres database without having to read the whole table into R regards Christiaan [[alternative HTML version deleted]] __

Re: [R] advice/opinion on - vs = in teaching R

2010-01-14 Thread Rolf Turner
On 15/01/2010, at 4:45 PM, Erin Hodgess wrote: Hi R People: I'm teaching a statistical computing class using R starting next week (yay!) and I have an opinion type question, please. I'm old school and use - in an assignment. However, I'm starting to see the = in the literature. Which

Re: [R] Newbie mistakes saving images to files

2010-01-14 Thread Rex C. Eastbourne
Thanks Jim! I followed the instructions in the FAQ and wrapped print() around my function calls. The images are now properly generated. Rex On Thu, Jan 14, 2010 at 4:38 PM, jim holtman jholt...@gmail.com wrote: If you are using lattice, check out FAQ 7.22 On Thu, Jan 14, 2010 at 5:15 PM, Rex

Re: [R] advice/opinion on - vs = in teaching R

2010-01-14 Thread Ted Harding
On 15-Jan-10 04:06:55, Rolf Turner wrote: On 15/01/2010, at 4:45 PM, Erin Hodgess wrote: Hi R People: I'm teaching a statistical computing class using R starting next week (yay!) and I have an opinion type question, please. I'm old school and use - in an assignment. However, I'm starting