Re: [R] add diagonal line

2010-10-27 Thread Gavin Simpson
On Wed, 2010-10-27 at 13:17 -0200, Marcelo Lima wrote: > Hi, > > I would like to add a line on the diagonal of a covariance matrix, is there > a quick way to do it besides abline? > > Thanks! What's wrong with abline()? It does exactly what you want. By the way, reproducible example such as re

[R] Creating truly global variable within function within namespace

2010-10-27 Thread Murray Stokely
I am trying to create a function with a package with a NAMESPACE that will save() some variables, distribute an Rdata file to another computer, where it will be load()ed. The problem is that this load() tries to load the namespace of the package on the original computer that created the .Rdata fil

[R] times

2010-10-27 Thread thoeb
Hi! I have an input table with a column "Dates" in the format "month/day/year" (eg. "5/11/1999" and a column "Times" in the format "hours/minutes" (eg. "15:20"). In R I need to convert them into chron objects to extract colums only containing months, days, minutes, .. For the dates it is no probl

[R] How to find out the trend during a time period?

2010-10-27 Thread Lao Meng
Hi all: I have a dataset which contains two variables: Y and time y<-c(228,189,232,198,252,315) time<-2003:2008 How can I find out the trend(increase/decrease) of y along the time period? If I use: lm(y~time) The "lm" command treats time as natural number,but not date. So maybe "lm" isn't approp

Re: [R] calculate area between intersecting polygons

2010-10-27 Thread jonas garcia
Many thanks for your help! Thanks to you guys I manage to solve my problem in an efficient way All the best J On Tue, Oct 26, 2010 at 11:04 PM, Remko Duursma wrote: > > I don't know why I forgot that you can do this as well : > > area.poly(intersect(p1,p2)) > > ... a bit more straightforward. >

Re: [R] Merging nested lists

2010-10-27 Thread Charles C. Berry
On Wed, 27 Oct 2010, Alex P. wrote: Hello All, I have multiple "list of lists" in the form of Mylist1[[N]][[K]]$Name_i, with N=1..6, K=1..3, and i=1..7. Each Name_i is a matrix. I have 30 of these objects Mylist1, Mylist2, ... I would like to merge these lists by each Name_i using rbind, bu

[R] Merging nested lists

2010-10-27 Thread Alex P.
Hello All, I have multiple "list of lists" in the form of Mylist1[[N]][[K]]$Name_i, with N=1..6, K=1..3, and i=1..7. Each Name_i is a matrix. I have 30 of these objects Mylist1, Mylist2, ... I would like to merge these lists by each Name_i using rbind, but I couldn't figure out how to do i

Re: [R] Merge disparate lists

2010-10-27 Thread Dennis Murphy
Hi: Is this what you need? l_one <- data.frame(key = c(2, 1, 2)) l_two <- data.frame(ndx = 1:4, descr = c('this', 'that', 'other', 'finis')) merge(l_one, l_two, by.x = 'key', by.y = 'ndx') key descr 1 1 this 2 2 that 3 2 that HTH, Dennis On Wed, Oct 27, 2010 at 10:53 AM, Jim Burke w

Re: [R] Multiple, multiple regressions...

2010-10-27 Thread Thomas Levine
Write a function() that does everything you want to do for one regression, then run that on all of them. It'll look something like this. library(car) myreg=function(X,v1,v2,v3,v4,v5) { reg=lm(X ~ v1 + v2 + v3 + v4 + v5) crPlots(reg) } Then run the function a lot, maybe in a loop or with sapply()

Re: [R] ggplot - unwanted sorted X values

2010-10-27 Thread Dennis Murphy
Hi: As David originally noted, your dates are going to be read in as factors with data.frame() unless you explicitly define them as Date objects first. Here's one way to get the plot using a toy example (since you didn't provide any data): library(ggplot2) dd [1] "21/2/10" "30/3/10" "30/4/10" "30

Re: [R] Changing origin of line in radial plot

2010-10-27 Thread Thomas Levine
I guess you have something like this. > testlen <- c(sin(seq(0,1.98*pi,length=100))+2+rnorm(100)/10) > testpos <- seq(0,1.98*pi,length=100) > radial.plot(testlen,testpos,rp.type="p",main="Test Polygon",line.col="blue") (http://addictedtor.free.fr/graphiques/graphcode.php?graph=75) Does this work

Re: [R] how to add rectangular grid to the plot generated by levelplot()?

2010-10-27 Thread David Winsemius
On Oct 27, 2010, at 4:33 PM, Czerminski, Ryszard wrote: David, Thanks a lot! panel.grid() does the trick, but the generated grid extends beyond the plot region from levelplot() Is there a way to restrict grid to the plot region from levelplot() ? Well, it doesn't when I hack the example on

Re: [R] How do I read multiple rows of different lengths?

2010-10-27 Thread smcguffee
Thanks, that is awesome! -- View this message in context: http://r.789695.n4.nabble.com/How-do-I-read-multiple-rows-of-different-lengths-tp3015986p3016413.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing li

Re: [R] How do I read multiple rows of different lengths?

2010-10-27 Thread Phil Spector
Here's how I'd approach the problem. First, read the file: a = readLines('testOut') Each different type of line can be identified by the string at the beginning of the line, based on these patterns. It seems that you only want the numbers, so we'll convert them as we extract them: pats

Re: [R] R-Excel Macro mode

2010-10-27 Thread Erich Neuwirth
RExcel has its own mailing list, rcom-l. Please subscribe on rcom.unvie.ac.at and post your question on that list. On 10/27/2010 1:29 PM, Puijman, R. wrote: > I'm using R-Excel's macro mode to make an R based Excel tool for inventory > management. It's quite a lot of R-code which I made in R at

Re: [R] install RSPerl on Fedora

2010-10-27 Thread L
On Wed, Oct 27, 2010 at 11:26 PM, Marc Schwartz wrote: > On Oct 27, 2010, at 5:48 AM, L wrote: > >> Hi >> I have R 2.11.1 installed at Fedora 13. when I tried to install RSPerl >> by command line >> >> sudo R CMD INSTALL ~/Download/RSPerl_0.92-1.tar.gz >> It failed with following errors, could som

[R] how to add rectangular grid to the plot generated by levelplot()?

2010-10-27 Thread Czerminski, Ryszard
David, Thanks a lot! panel.grid() does the trick, but the generated grid extends beyond the plot region from levelplot() Is there a way to restrict grid to the plot region from levelplot() ? Best regards, Ryszard -- Confi

Re: [R] Formatting durations

2010-10-27 Thread Gabor Grothendieck
On Wed, Oct 27, 2010 at 3:07 PM, Susanta Mohapatra wrote: > I have one more pattern to take care of. > What is happening is that if a string like "10 minutes and 30 seconds" comes > for parsing then the function generates 2 values both for 10 minutes and for > 30 seconds and the result list then h

Re: [R] How do I read multiple rows of different lengths?

2010-10-27 Thread smcguffee
For those interested in the data, as I did receive at least one request, I'll post it here: http://r.789695.n4.nabble.com/file/n3016233/testOut testOut -- View this message in context: http://r.789695.n4.nabble.com/How-do-I-read-multiple-rows-of-different-lengths-tp3015986p3016233.html Sent fro

Re: [R] Fwd: as.list

2010-10-27 Thread David Winsemius
On Oct 27, 2010, at 4:02 PM, Sibylle Stöckli wrote: Dear Ivan, Thanks a lot. I managed to create a list (KANE.LIST) out of my data set (KANE). There is still the problem within the barplot function (non-numeric argument). There are no NA values and just the variable names are non-numer

[R] Changing origin of line in radial plot

2010-10-27 Thread Gonzalo Garcia-Perate
I am creating radial plots to visualise popularity of a series of topics, I was wondering if someone has come across a radial plot in which the lines originate from the edge of the plot instead of the centre, does anyone know how can this be achieved in R? Are there any good reasons not to do it?

Re: [R] How do I read multiple rows of different lengths?

2010-10-27 Thread smcguffee
Using the text itself works, although slightly annoying. I ended up just processing the text each time I wanted a value inside it, which turns out to be about the same thing. The key to processing the text ended up being a command: library("CGIwithR") followed by another command scanText(textLine)

Re: [R] Fwd: as.list

2010-10-27 Thread Sibylle Stöckli
Dear Ivan, Thanks a lot. I managed to create a list (KANE.LIST) out of my data set (KANE). There is still the problem within the barplot function (non-numeric argument). There are no NA values and just the variable names are non- numeric... Thanks Sibylle > PA<-read.table("Biotree_parti

Re: [R] How do I read multiple rows of different lengths?

2010-10-27 Thread David Winsemius
On Oct 27, 2010, at 3:27 PM, smcguffee wrote: Actually, I take that back, this is only reading in 18 values at the most in a list, but some lists should be over 200 values in length... I think the read.table and cousins read in some modest fraction of the data Probably need to either

Re: [R] How do I read multiple rows of different lengths?

2010-10-27 Thread David Winsemius
On Oct 27, 2010, at 3:27 PM, smcguffee wrote: Actually, I take that back, this is only reading in 18 values at the most in a list, but some lists should be over 200 values in length... -- View this message in context: http://r.789695.n4.nabble.com/How-do-I-read-multiple-rows-of-different-l

Re: [R] Best IDE for R

2010-10-27 Thread Liviu Andronic
On Wed, Oct 27, 2010 at 9:21 PM, steven mosher wrote: > Thanks for the pointer, > > After looking at the many folders of R code I have I decided it was time to > start working in an IDE and also getting my stuff under version control ( > for my own sanity) > > I'll have a look at Geany.. for versi

Re: [R] coxph linear.predictors

2010-10-27 Thread Bond, Stephen
I think I found the first piece of it. Typical SAS: > fit$linear.predictors[1]-coef(fit)*(ovarian$age[1]-mean(ovarian$age)) age -4.4408920985e-16 Well misrepresented in several places... Stephen Bond -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.ne

Re: [R] How do I read multiple rows of different lengths?

2010-10-27 Thread smcguffee
Actually, I take that back, this is only reading in 18 values at the most in a list, but some lists should be over 200 values in length... -- View this message in context: http://r.789695.n4.nabble.com/How-do-I-read-multiple-rows-of-different-lengths-tp3015986p3016151.html Sent from the R help m

Re: [R] Formatting durations

2010-10-27 Thread Susanta Mohapatra
I have one more pattern to take care of. What is happening is that if a string like "10 minutes and 30 seconds" comes for parsing then the function generates 2 values both for 10 minutes and for 30 seconds and the result list then has 2 elements. So when I use unlist function then try to merge wit

Re: [R] Best IDE for R

2010-10-27 Thread steven mosher
Thanks for the pointer, After looking at the many folders of R code I have I decided it was time to start working in an IDE and also getting my stuff under version control ( for my own sanity) I'll have a look at Geany.. for version control.. not so sure. On Wed, Oct 27, 2010 at 12:14 PM, Liviu

Re: [R] How do I read multiple rows of different lengths?

2010-10-27 Thread smcguffee
fitLines=read.delim("testOut",header=FALSE,quote="") worked pretty well. I have a bunch of NA's that I don't want, but at least I can access the data I do want. Thank you, Sean -- View this message in context: http://r.789695.n4.nabble.com/How-do-I-read-multiple-rows-of-different-lengths-tp30159

Re: [R] Best IDE for R

2010-10-27 Thread Liviu Andronic
On Wed, Oct 27, 2010 at 9:05 PM, Jonathan P Daily wrote: > I can second using Geany as an IDE. > Great, finally a soulmate! :) More seriously, I think Geany is under-appreciated and virtually unkonwn in the R community. > Another large plus for it is that it is cross platform (I work in both >

Re: [R] coxph linear.predictors

2010-10-27 Thread Bond, Stephen
What you suggest is exactly what I intended. The big problem is that X*beta != linear.predictor # it works for glm That's a big loose end. The survival documentation on p41 implies that the above should be an equality, but it is not. And I could not produce the surv vector using a variety o

Re: [R] Best IDE for R

2010-10-27 Thread Jonathan P Daily
I can second using Geany as an IDE. Another large plus for it is that it is cross platform (I work in both Windows and Linux), cross environment (I also code in Python/Sage), very customizable, and even has a version on PortableApps for windows so you can take a customized version around on a U

[R] naive bayes of e1071 package

2010-10-27 Thread Sauli Rintanen
Hi, I am using e1071 package and trying to do classification on Iris dataset: model <- naiveBayes(Species ~ ., data = iris) pred <- predict(model, iris[,]) How can I see conditional probability distribution of this model? And also how can I see maximum likelihood estimate for the model? Thanks

[R] How do I read multiple rows of different lengths?

2010-10-27 Thread smcguffee
Hi, I have a data file with hundreds of rows, with every first, second, third, and fourth line representing a set of numbers for row names x, y, fit, and residuals, respectively. However, any given group of these lines might be from 10 to 2 values long. When I try fits=read.delim2("test") E

Re: [R] Best IDE for R

2010-10-27 Thread Liviu Andronic
On Wed, Oct 27, 2010 at 4:05 PM, Lee Hachadoorian wrote: > For an R-enabled text editor, I would suggest Tinn-R for Windows or RGedit > (a gedit plugin) for Linux/Gnome-desktop. Since both are just text > editors, they will work with whatever version R you have installed > (criteria 1). > > RGedit

Re: [R] Y Axis Labels

2010-10-27 Thread Downey, Patrick
Thank you both. Using axis I have gotten exactly what I needed. Thanks, Mitch -Original Message- From: Thomas Levine [mailto:thomas.lev...@gmail.com] Sent: Wednesday, October 27, 2010 2:34 PM To: Sarah Goslee Cc: Downey, Patrick; r-help@r-project.org Subject: Re: [R] Y Axis Labels Oop

Re: [R] Y Axis Labels

2010-10-27 Thread Thomas Levine
Oops. That was backwards plot(scale~time,axes=F) axis(2,at=0:4,labels=c("Never", "Once per month", "A few times per month", "A few times per week","Everyday")) axis(1) Tom 2010/10/27 Thomas Levine : > More specifically > > time=rnorm(20)+10 > scale=rep(0:4,4) > plot(time~scale,axes=F) > axis(1,a

Re: [R] Reading in a tab delimitated file

2010-10-27 Thread steven mosher
if your data for the rest of the file looks like this then read.fwf will work. depending which vars you want to pull) widths= c(18,32,41) E-CBIL-28-raw-cel-1435145228.cel1 would pull 3 vars, E-CBIL-28-raw-cel-; 1435145228.cel;1 widths <-c(32,41) E-CBIL-28-raw-cel-1435145228.cel;1 you

Re: [R] (no subject)

2010-10-27 Thread David Winsemius
On Oct 27, 2010, at 2:20 PM, Czerminski, Ryszard wrote: I would appreciate any advice about how to add rectangular grid to the plot generated by levelplot() similarly as grid() function adds grid to the regular plot() ?panel.grid Best regards, Ryszard -- David Winsemius, MD West Hartford

Re: [R] How do I read multiple rows of different lengths?

2010-10-27 Thread David Winsemius
On Oct 27, 2010, at 1:53 PM, smcguffee wrote: Hi, I have a data file with hundreds of rows, with every first, second, third, and fourth line representing a set of numbers for row names x, y, fit, and residuals, respectively. However, any given group of these lines might be from 10 to 20

[R] (no subject)

2010-10-27 Thread Czerminski, Ryszard
I would appreciate any advice about how to add rectangular grid to the plot generated by levelplot() similarly as grid() function adds grid to the regular plot() Best regards, Ryszard -- Confidentiality Notice: This message

Re: [R] coxph linear.predictors

2010-10-27 Thread David Winsemius
On Oct 27, 2010, at 1:45 PM, Bond, Stephen wrote: coef(fit)*model.matrix(fit)[1,1] age 11.69021 I don't know what that might be and you are not telling us what you think it is. I think this the calculation of the linear predictor, multiplying (the beta*X) I expected that coef(fit)

Re: [R] R on 32-bit ubuntu with PAE enabled

2010-10-27 Thread Uwe Ligges
On 26.10.2010 16:41, Wensui Liu wrote: morning, all right now, I have R installed on a 32-bit ubuntu with PAE enabled. And I can see more than 4-g memory available in system monitor. my question is: might this 32-bit R take advantage of the extra memory and handle large data? No. Uwe tha

Re: [R] Merge disparate lists

2010-10-27 Thread Joshua Wiley
Hi Jim, Here is one way: # How I imagine your data might be stored l_one <- list(structure(list(key = c(2, 1, 2)), .Names = "key", row.names = c(NA, -3L), class = "data.frame")) l_two <- list(structure(list(ndx = 1:4, descr = c("this", "that", "other", "finis")), .Names = c("ndx", "descr"), row.n

Re: [R] lineplot.CI {sciplot}: continuous line

2010-10-27 Thread Fotis Fotiadis
It's much more elegant if I set the 'type' parameter to "p" in lineplot.CI... Thank you, that was really helpful --- Στις Τετ., 27/10/10, ο/η Thomas Levine έγραψε: > Από: Thomas Levine > Θέμα: Re: [R] lineplot.CI {sciplot}: continuous line > Προς: "Fotis Fotiadis" > Κοιν.: r-help@r-projec

[R] How do I read multiple rows of different lengths?

2010-10-27 Thread smcguffee
Hi, I have a data file with hundreds of rows, with every first, second, third, and fourth line representing a set of numbers for row names x, y, fit, and residuals, respectively. However, any given group of these lines might be from 10 to 2 values long. When I try fits=read.delim2("test") E

[R] Merge disparate lists

2010-10-27 Thread Jim Burke
My two lists look like below Need an R code example that combines the two. l_one "key" 2 1 2 l_two "ndx", "descr" 1, "this" 2, "that" 3, "other" 4, "finis" My goal is a new list that looks like below. ndx descr 2 that 1 this 2 that Thanks, Jim __

Re: [R] coxph linear.predictors

2010-10-27 Thread Bond, Stephen
>> >> coef(fit)*model.matrix(fit)[1,1] >> age >> 11.69021 >> > I don't know what that might be and you are not telling us what you > think it is. I think this the calculation of the linear predictor, multiplying > (the beta*X) I expected that coef(fit)*model.matrix(fit)[1,1]= fit$linear.

Re: [R] lineplot.CI {sciplot}: continuous line

2010-10-27 Thread Thomas Levine
It could be more elegant, but I think this does what you want. > ... > lineplot.CI(blck, perf, group = cnd, xlab="Block", ylab="% Optimal > Responses", cex.leg=1.2, x.leg = 18, y.leg=0.4, err.width=0.05, pch = > c(15,15), col=c("grey", "black"), lty=c(1,1), main = "Experiments 2 and 3", > ylim

Re: [R] ggplot - unwanted sorted X values

2010-10-27 Thread David Winsemius
On Oct 27, 2010, at 5:17 AM, ashz wrote: Hi, I have this script: dat <- data.frame(X = halistat$Date,Y1 = halistat$avg,Y2 = halistat $stdev) ggplot(data = dat, aes(x = X, y = Y1, ymin = Y1 - Y2, ymax = Y1 + Y2)) + geom_point() + # points at the means geom_line() + # if you want lines b

Re: [R] Fitting GLM with BFGS algorithm

2010-10-27 Thread Prof. John C Nash
In the sort of problem mentioned below, the suggestion to put in gradients (I believe this is what is meant by "minus score vector") is very important. Using analytic gradients is almost always a good idea in optimization of smooth functions for both efficiency of computation and quality of resu

Re: [R] Regular time series with irregular start and end dates

2010-10-27 Thread Gabor Grothendieck
On Wed, Oct 27, 2010 at 10:01 AM, Wesley Roberts wrote: > Dear R users, > > I have a quick question regarding creating an index for a zoo object. I am > using R 2.12 on winxp. > > I have read through the R archives searching for information on dates and > time series analysis and nothing seems t

[R] Y Axis Labels

2010-10-27 Thread Downey, Patrick
Hello, I have am plotting a 0-4 ordinal scale (y-axis) against time (x-axis). Is there a way to label the values on the y-axis with the translation from the scale? That is, instead of having 0,1,2,3,4 on the y-axis, I would like "Never", "Once per month", "A few times per month", "A few times per

[R] keep adding elements to the matrix

2010-10-27 Thread Alaios
Hello everyone, I would like to create a "dynamic" array to keep storing number in it for (i in c(2:length(final))){ myarray <-final[i]-final[i-1] myarray2<-2*final[i] } At the end I would like to use myarray as the x values of an array and the myarray2 as the yvalues of the same ar

Re: [R] stripping #s in a text file prior to reading into table or dataframe

2010-10-27 Thread Donald Braman
read.delim2 did the trick -- many thanks!!! On Wed, Oct 27, 2010 at 10:01 AM, Jorge Ivan Velez wrote: > ?read.delim2 > > HTH, > Jorge > > > On Wed, Oct 27, 2010 at 9:51 AM, Donald Braman wrote: > >> Thanks for your advice! I still get the same error, though -- not sure >> why. >> >> >> > read.t

Re: [R] "non-numeric argument to binary operator" error while reading ncdf file

2010-10-27 Thread Charles Novaes de Santana
Hi, Well, I did it, but all my script was on the first message. I don't have any other variables. I am just reading a NCDF file and trying to read the variable "tasmax", that has values of temperatures. The only "new" information I have is the header of the NCDF file (Spain02D_tasmax.nc), that I

[R] Regular time series with irregular start and end dates

2010-10-27 Thread Wesley Roberts
Dear R users, I have a quick question regarding creating an index for a zoo object. I am using R 2.12 on winxp. I have read through the R archives searching for information on dates and time series analysis and nothing seems to cover my question. I am extracting data from a time series of remo

Re: [R] Data.frame Vs Matrix Vs Array: Definitions Please

2010-10-27 Thread Gabor Grothendieck
On Wed, Oct 27, 2010 at 10:07 AM, Ivan Calandra wrote: > > > Le 10/27/2010 15:45, Gabor Grothendieck a écrit : >> >> On Wed, Oct 27, 2010 at 8:38 AM, Ivan Calandra >>  wrote: >>> >>> What I don't understand is why vectors (with more than one value) don't >>> have >>> dimensions. They look like th

[R] (no subject)

2010-10-27 Thread Timothy Spier
I am interested in using "multcompLetters" after running "kruskalmc" but I'm a newbie and I'm not having luck figuring it out. I can run "kruskalmc" just fine, but after studying the documentation for "multcompletters" for a long time, I cannot figure out how to make it work. Any ideas? R input

Re: [R] Best IDE for R

2010-10-27 Thread Lee Hachadoorian
On Wed, 27 Oct 2010 16:31:30 +0530, Santosh Srinivas wrote: > I am looking for suggestions for the "best" IDE for R. Best is obviously > subjective but I need just the basic features that should function well (and > I looked through the threads already). > - Proper integration with R 2.11.1 > - Go

[R] correctness of a formula in lme (from package nlme)

2010-10-27 Thread Dimitri Liakhovitski
Hello! This is a sanity check based on my inexperience with mixed effects models - I'd like to make sure the formula I wrote is correct for what I am trying to do: In my data set "MyData", I have a response variable (DV), 8 numeric predictors (a through h) and a factor "group" with several levels.

[R] Fill in missing times in a timeseries with NA

2010-10-27 Thread lglew
Hi, I have a irregularly spaced time series dataset, which reads in from a .csv. I need to convert this to a regularly spaced time series by filling in missing rows of data with NAs. So my data, called NtuMot, looks like this (I've removed some of the additional rows for simplicity) ELEID

Re: [R] Formatting durations

2010-10-27 Thread Susanta Mohapatra
Thanks Gabor, It is a very tricky task and your comment helped. I modified the function to handle average of two numbers when it is like 2-3 minutes. I also improved on the regex part to parse the decimal parts also. Right now i can parse 100% of one sample. Thanks Susanta On Wed, Oct 27, 2010 a

[R] trouble opening connection 64bit R with win7 64bit

2010-10-27 Thread Hayes, Daniel
Hi, I just installed R 64bit under Windows 7 64 bit When trying to readin files I get the following error message: > > source(file="C:\\Users\\me\\Documents\\My PhD\\Modelling\\R\\Scripts\\Functions\\functions 20jan10.r") Error in file(file, "rt") : cannot open the connection In addition: Warn

[R] ggplot - unwanted sorted X values

2010-10-27 Thread ashz
Hi, I have this script: dat <- data.frame(X = halistat$Date,Y1 = halistat$avg,Y2 = halistat$stdev) ggplot(data = dat, aes(x = X, y = Y1, ymin = Y1 - Y2, ymax = Y1 + Y2)) + geom_point() + # points at the means geom_line() + # if you want lines between pints geom_errorbar() # error bars, Y1

Re: [R] reading multiple XML files into an R table

2010-10-27 Thread Kjetil Halvorsen
for the loop part: put all your xml files in a directory with no other files, do setwd("directory/with/xml/files") files <- list.files() for (file in files) kjetil 2010/10/27 Ista Zahn : > Hi Jørgen, > You will be better served by learning how to find the answers to these > kinds of questions

Re: [R] stripping #s in a text file prior to reading into table or dataframe

2010-10-27 Thread Duncan Murdoch
On 27/10/2010 9:51 AM, Donald Braman wrote: Thanks for your advice! I still get the same error, though -- not sure why. > read.table('don.5.clusters.txt', header = TRUE, comment.char = '', quote ='') Error in read.table("don.5.clusters.txt", header = TRUE, comment.char = "", : more col

Re: [R] Data.frame Vs Matrix Vs Array: Definitions Please

2010-10-27 Thread Ivan Calandra
Le 10/27/2010 15:45, Gabor Grothendieck a écrit : On Wed, Oct 27, 2010 at 8:38 AM, Ivan Calandra wrote: What I don't understand is why vectors (with more than one value) don't have dimensions. They look like they do have 1 dimension. For me no dimension would be a scalar. Like in geometry: a

Re: [R] stripping #s in a text file prior to reading into table or dataframe

2010-10-27 Thread Donald Braman
Thanks for your advice! I still get the same error, though -- not sure why. > read.table('don.5.clusters.txt', header = TRUE, comment.char = '', quote ='') Error in read.table("don.5.clusters.txt", header = TRUE, comment.char = "", : more columns than column names Any other thoughts? --

Re: [R] "non-numeric argument to binary operator" error while reading ncdf file

2010-10-27 Thread Charles Novaes de Santana
Thank you for your answer, Jim! I will try it and post what I find. cheers, Charles On Wed, Oct 27, 2010 at 3:46 PM, jim holtman wrote: > put: > > options(error=utils::recover) > > in your script so that when an error occurs you are dropped into the > 'browser' so that you can examine the vari

Re: [R] "non-numeric argument to binary operator" error while reading ncdf file

2010-10-27 Thread jim holtman
put: options(error=utils::recover) in your script so that when an error occurs you are dropped into the 'browser' so that you can examine the variables at that point in time. There are several references on how to use the debugging tools in R that will help you resolve your problem. We can not

Re: [R] Data.frame Vs Matrix Vs Array: Definitions Please

2010-10-27 Thread Gabor Grothendieck
On Wed, Oct 27, 2010 at 8:38 AM, Ivan Calandra wrote: > What I don't understand is why vectors (with more than one value) don't have > dimensions. They look like they do have 1 dimension. For me no dimension > would be a scalar. Like in geometry: a point has no dimension, a line has 1, > a square

Re: [R] Control of axis limits in multiple panel lattice plots

2010-10-27 Thread Peter Davenport
I've found the solution to this in an old post of Deepayan's: lattice.options(axis.padding = list(numeric=0)) Best, Peter On 27 October 2010 09:28, Peter Davenport wrote: > Unwanted space (padding?) is introduced at the extremes of the x and y > axes of my lattice plots. > I've tried defining t

Re: [R] Conditional looping over a set of variables in R

2010-10-27 Thread Peter Ehlers
On 2010-10-27 06:21, David Herzberg wrote: Peter, thanks for this elegant solution that works well and handles the empty cases. However, the vector it returns includes both the row (case) numbers and the target result (number of column of first "1"). How can I strip out the row numbers and leav

Re: [R] Increase R precision

2010-10-27 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 27.10.2010 14:21:14: > So? > Do you imply that I do not need to change the precision.. and if yes how to > change the default display settings? > (18-46)/(45-93) [1] 0.583 > (18-46)/(45-93)*1e12 [1] 5833 So the computation use machine pre

Re: [R] reading multiple XML files into an R table

2010-10-27 Thread Ista Zahn
Hi Jørgen, You will be better served by learning how to find the answers to these kinds of questions on your own. You can either use a general search engine such as google: http://lmgtfy.com/?q=read+multiple+files+in+R http://lmgtfy.com/?q=read+xml+data+in+R or using an R specific search engine. At

[R] "non-numeric argument to binary operator" error while reading ncdf file

2010-10-27 Thread Charles Novaes de Santana
Hi everyone, I am a newbie in R and in this discussion list. I am trying to use R package "ncdf" to read values of temperature from a NCDF file. I did it before to another file using the function "get.var.ncdf", but now there is an error that I can not solve, and I would really appreciate if you c

Re: [R] Fwd: as.list

2010-10-27 Thread Ivan Calandra
Hi Sibylle, I was about to send you an email, but I'll modify it thanks to your second! Is PA what you expect? Does it contain the data you want? You should provide some sample data. If the importation worked, try to copy/paste the output of dput(PA), which we can then copy/paste in our console

Re: [R] Which version control system to learn for managing Rprojects?

2010-10-27 Thread Gabor Grothendieck
On Wed, Oct 27, 2010 at 8:49 AM, wrote: > Gabor > > As someone trying to the rest of my team using Subversion (which I have used > for a while, but more as a backup / record of changes), have you a neat / > automated way of building a package from a subversion repository? > Normally one keeps

Re: [R] Conditional looping over a set of variables in R

2010-10-27 Thread David Herzberg
Peter, thanks for this elegant solution that works well and handles the empty cases. However, the vector it returns includes both the row (case) numbers and the target result (number of column of first "1"). How can I strip out the row numbers and leave only the target result. Regards, David S

[R] as.list rcode

2010-10-27 Thread Sibylle Stöckli
Original-Nachricht Datum: Wed, 27 Oct 2010 15:09:59 +0200 Von: "Sibylle Stöckli" An: Rhelp Betreff: Fwd: as.list Original-Nachricht Datum: Wed, 27 Oct 2010 15:03:48 +0200 Von: "Sibylle Stöckli" An: Rhelp Betreff: as.list Dear R-users sorry, here Rcode incl

Re: [R] Best IDE for R

2010-10-27 Thread Jonathan P Daily
I noticed that nabble link presented Notepad++ as having to copy/paste into the editor. There is a companion to NP++, though, that allows line/file passing directly to an R console, auto-completion, and a bunch of other goodies called NppToR. -- Jonathan P. Da

[R] Fwd: as.list

2010-10-27 Thread Sibylle Stöckli
Original-Nachricht Datum: Wed, 27 Oct 2010 15:03:48 +0200 Von: "Sibylle Stöckli" An: Rhelp Betreff: as.list Dear R-users sorry, here Rcode included (attachment has been removed) I would like to read a txt file as list, to select rows and columns, and to create barplots. (1)

[R] as.list

2010-10-27 Thread Sibylle Stöckli
Dear R-users I would like to read a txt file as list, to select rows and columns, and to create barplots. (1) selection of parameter site and part: ok (2) read txt file as list: problem with (1) as there are NA's (the lines not selected) (3) barplot: 5 different groups of bars (the selected co

Re: [R] Best IDE for R

2010-10-27 Thread Dennis Murphy
Hi: This topic came up a couple of days ago: http://r.789695.n4.nabble.com/R-file-td3009812.html#a3009812 HTH, Dennis On Wed, Oct 27, 2010 at 4:01 AM, Santosh Srinivas < santosh.srini...@gmail.com> wrote: > Dear R-Group, > > I am looking for suggestions for the "best" IDE for R. Best is obviou

Re: [R] Zoom in in a plot

2010-10-27 Thread Michael Lawrence
You might want to check out the Qt stuff we've been working on. The qtutils package has a graphics device that supports zooming and other fun stuff. Also, qtpaint provides a flexible low-level engine for interactive graphics. See: http://github.com/ggobi/qtpaint and http://github.com/ggobi/qtutils

Re: [R] Which version control system to learn for managing Rprojects?

2010-10-27 Thread Whit Armstrong
http://hudson-ci.org On Wed, Oct 27, 2010 at 8:49 AM, wrote: > Gabor > > As someone trying to the rest of my team using Subversion (which I have used > for a while, but more as a backup / record of changes), have you a neat / > automated way of building a package from a subversion repository?

Re: [R] plot by cathegories within a factor

2010-10-27 Thread Dennis Murphy
Hi: Here's another take with ggplot2: library(ggplot2) # Define the basic plot elements. First argument is the data frame. # aes() refers to the plot's aesthetics, which refer to the variables # mapped to specific 'roles' in the plot 'geoms' g <- ggplot(x, aes(x = Age, y = Trait)) g + geom_poin

Re: [R] Which version control system to learn for managing Rprojects?

2010-10-27 Thread david.jessop
Gabor As someone trying to the rest of my team using Subversion (which I have used for a while, but more as a backup / record of changes), have you a neat / automated way of building a package from a subversion repository? Thanks David Jessop -- David Jessop Global He

Re: [R] One silly question about "tapply output"

2010-10-27 Thread Vincy Pyne
Dear Sirs, Thanks a lot for your great help. This is going to help me immensely in future as many times I had found myself struggling with this problem. Thanks again for the great help. Regards Vincy --- On Wed, 10/27/10, Dimitri Liakhovitski wrote: From: Dimitri Liakhovitski Subject:

Re: [R] Data.frame Vs Matrix Vs Array: Definitions Please

2010-10-27 Thread Dennis Murphy
Hi: I'm going to take a different tack from Gabor and Ivan and be strictly qualitative on the distinctions among vectors, matrices, arrays, data frames and lists. As Ivan mentioned, a vector has a single (atomic) mode - i.e., all elements of a vector must be of the same type. A numeric vector con

Re: [R] Increase R precision

2010-10-27 Thread Alain Guillet
As everybody told you in using options with digits... It exactly is what I made in the sent code. Alain On 27-Oct-10 14:21, Alaios wrote: So? Do you imply that I do not need to change the precision.. and if yes how to change the default display settings? Best regards Alex

Re: [R] Data.frame Vs Matrix Vs Array: Definitions Please

2010-10-27 Thread Ivan Calandra
My comments are in the text. Le 10/27/2010 12:11, Gabor Grothendieck a écrit : On Wed, Oct 27, 2010 at 4:03 AM, Ivan Calandra wrote: Hi, Gabor gave you a great answer already. But I would add a few precisions. Someone please correct me if I'm wrong. Arrays are matrices with more than 2 dime

Re: [R] install RSPerl on Fedora

2010-10-27 Thread Marc Schwartz
On Oct 27, 2010, at 5:48 AM, L wrote: > Hi > I have R 2.11.1 installed at Fedora 13. when I tried to install RSPerl > by command line > > sudo R CMD INSTALL ~/Download/RSPerl_0.92-1.tar.gz > It failed with following errors, could some one offer help? > > Thanks > > Yuan > > Converters.c: In fu

Re: [R] Increase R precision

2010-10-27 Thread Alaios
So? Do you imply that I do not need to change the precision.. and if yes how to change the default display settings? Best regards Alex From: Alain Guillet Cc: Rhelp Sent: Wed, October 27, 2010 1:58:46 PM Subject: Re: [R] Increase R precision Hi, It is no

Re: [R] Zoom in in a plot

2010-10-27 Thread Jonathan P Daily
In that case you may wish to look into the rggobi package, which provides an R interface to the ggobi tools. I haven't used it much, but it has a lot of interactive options. -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearne

Re: [R] Chron object in time series plot

2010-10-27 Thread Gabor Grothendieck
On Wed, Oct 27, 2010 at 8:04 AM, Manta wrote: > > Here it is: > > dput(temp_plot) > structure(c(48608, 46686, 55216, 59268, 50967, 55067, 57783, > 60021, 61480, 63853, 58267, 72442, 63926, 49102, 74320, 63433, > 66256, 68483, 67736, 60507, 60888, 78008, 64326, 65665, 57288, ... >    1L, 1L, 1L, 1L

Re: [R] Chron object in time series plot

2010-10-27 Thread Manta
Here it is: dput(temp_plot) structure(c(48608, 46686, 55216, 59268, 50967, 55067, 57783, 60021, 61480, 63853, 58267, 72442, 63926, 49102, 74320, 63433, 66256, 68483, 67736, 60507, 60888, 78008, 64326, 65665, 57288, 54663, 54984, 54073, 59632, 52523, 55266, 54836, 61408, 53813, 85855, 65204, 6

  1   2   >