Re: [R] Does anyone has this paper in pdf?

2009-01-23 Thread Jim Lemon
Rolf Turner wrote: ... It always gets fussy and fiddly whenever legal issues arise. It would be nice if there were no such thing as ``intellectual property'' (which has always seemed to me to be an oymoron) and no such thing as lawyers. Hey, some of my best friends are lawyers. And who wants

Re: [R] Sweave encoding problem

2009-01-23 Thread Gerrit Voigt
The two documents were actually different, which I didn't notice yesterday. One had different encoding. Thanks for your help Duncan. Unfortunetly the other problem still exists. My R or Sweave seems not to be able to work with utf-8 encoding. Everything works fine with latin-1, though. I coul

Re: [R] Is it possible for R to import a SigmaPlot file?

2009-01-23 Thread Bernardo Rangel Tura
On Thu, 2009-01-22 at 14:58 -0800, Jason Rupert wrote: > I recently received a Sigmaplot file (*.jnb)from a customer and would like to > know if I can input it to a data frame and then manipulate the data in R. > > I did a search on Google and on RSeek (www.rseek.org), but did not get any > goo

Re: [R] ggplot2 example

2009-01-23 Thread ONKELINX, Thierry
Hi Felipe, As I recall that is a known bug in the current version of ggplot2. Cheers, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest Cel biometrie, met

Re: [R] Vector Autocorrelation Function in R?

2009-01-23 Thread Stefan Grosse
Andreas Klein schrieb: > Hello. > > > Does anyone know, if there is a function in R to compute the vector > autocorrelations? > > ?ccf on bivariate time series. + have a look at the vars package though I am not sure what exactly you are trying. hth Stefan

Re: [R] Extra rows of 'NAs' in imported dataset

2009-01-23 Thread Patrick Burns
'The R Inferno' page 87 talks about getting extra columns from data derived from spreadsheets. It happens because the spreadsheet program thinks for some reason that the extra cells are used -- a cell was probably clicked on. Patrick Burns patr...@burns-stat.com +44 (0)20 8525 0696 http://www.bur

Re: [R] Package installation failed

2009-01-23 Thread Uwe Ligges
Odette Gaston wrote: Hi Uwe and all, Error message was: error in normalizePath(path) : path[1]: no such file to load Hmmm, what does traceback() tell you at that point? Have you had a cionnection to CRAN and has something been downloaded? If so, to which directory? Where is R installed? Do

Re: [R] how to get a primitive function object

2009-01-23 Thread Patrick Burns
If I understand properly, you want '<-' to be a generic function, which it currently isn't. There may be a way to fake that (I can't think of any). But I'm wondering if you should rethink what you want. The only reason that I can think of that you would want to change '<-' is because of some ext

Re: [R] dimnames in pkg "ipred"

2009-01-23 Thread Häring, Tim (LWF)
I think I solved the problem =) My dataset is an .arff file. So I read my data into R via read.arff. I tried the following: Export the dataframe to an txt-file and import it once again in R via read.table. With the new dataset if works fine. Maybe the error comes from the variable-names. I attach

Re: [R] Does anyone has this paper in pdf?

2009-01-23 Thread Neil Shephard
Rolf Turner-3 wrote: > > > Is this really a violation of copyright? If I have a copy of a > journal I believe > it is within the compass of ``fair practice'' (or some such jargon) > to make a photocopy > of a particular article and give this copy to a colleague or student > for research

[R] R startup and shutdown question

2009-01-23 Thread Philip Smith
Hi R-Community: Here is what I want to do: Every time I start R I want R to: 1. remove(list=ls()), and 2. "source" another file automatically. Then, when I shutdown R, I want R to: 1. remove(list=ls()) How do I do this? I recall vaguely that S could do this, but I don't remember exa

[R] Relative frequency of cases in data frame matching a specified criteria

2009-01-23 Thread Stefan Björk
I want to get the relative frequency of cases in a data frame that matches a specified criteria, omiting NA values. This seem so simple, but I can't come up with an effective way. nrow(data[data$variable>value & !is.na(data$variable),])/nrow(data) works but is very ineffective and CPU consuming w

Re: [R] ggplot seq

2009-01-23 Thread ONKELINX, Thierry
Dear Felipe, Provide a dummy sample if your dataset is big or confidential. The actual values are not that important to figure out what kind of plot you want. How did you code Week? Numeric? Try convert it into a factor with levels = c(27:52, 1:26). And then set the breaks to seq(1, 52, by = 2).

Re: [R] ggplot2

2009-01-23 Thread ONKELINX, Thierry
Dear Vikas, First a few remarks: - as we don't have your dataset, your example is not reproducible. Please do add a (dummy) dataset next time. - adding spaces makes code much more readable. - why do you use scale_colour_gradient2 if you set the midpoint at the lower level? Use scale_colour_gradien

Re: [R] R startup and shutdown question

2009-01-23 Thread Uwe Ligges
Philip Smith wrote: Hi R-Community: Here is what I want to do: Every time I start R I want R to: 1. remove(list=ls()), and You do not need to given you start with an emty workspace, i.e. start R with: R --no-restore 2. "source" another file automatically. Write it in your RProf

Re: [R] Relative frequency of cases in data frame matching a specified criteria

2009-01-23 Thread Dimitris Rizopoulos
in this case you just need: mean(data$variable > value & !is.na(data$variable)) I hope it helps. Best, Dimitris Stefan Björk wrote: I want to get the relative frequency of cases in a data frame that matches a specified criteria, omiting NA values. This seem so simple, but I can't come up wi

Re: [R] convergence problem gamm / lme

2009-01-23 Thread Simon Wood
Geert, Can you get a simpler model with, say, a quadratic dependence on lon, lat to converge, using glmmPQL? The answer might give a clue about whether the issue is related to using a smoother, or is something more basic. How confident are you that the Poisson assumption is reasonable? Can th

Re: [R] how to get a primitive function object

2009-01-23 Thread Duncan Murdoch
Wacek Kusnierczyk wrote: Duncan Murdoch wrote: You can use parent.frame() as the pos or envir argument to assign(), and then the assignment happens in the caller's frame. And assign() is also another way out if you overwrite <- with something that doesn't work; just call it to reassign base

Re: [R] Sweave encoding problem

2009-01-23 Thread Duncan Murdoch
Gerrit Voigt wrote: The two documents were actually different, which I didn't notice yesterday. One had different encoding. Thanks for your help Duncan. Unfortunetly the other problem still exists. My R or Sweave seems not to be able to work with utf-8 encoding. Everything works fine with la

[R] can't load rJava in R 2.8.1 on Windows XP

2009-01-23 Thread drflxms
Dear community, unfortunately I did not manage load the rJava package receiving the following error-message: > library("rJava") Error in inDL(x, as.logical(local), as.logical(now), ...) : kann shared library 'C:/Programme/R/2.8.1/library/rJava/libs/rJava.dll' nicht laden: LoadLibrary failure:

[R] Returning NA from lm

2009-01-23 Thread Neil Beddoe
Hi. I need to apply run a regression analysis for groups of data of fixed length:100 As, 100 Bs, 100 Cs etc. eg x Key Value A 1 A 21.2 A 4 A 6.5 ...repeat 96 times with differing values of A B 1 B 2.3 B NA B 6.5 ...repeat 96 times with differi

[R] R for Computational Neuroscience?

2009-01-23 Thread Mike Lawrence
Hi all, I've noticed that many computational neuroscience research groups use MATLAB. While it's possible that MATLAB may have some features unavailable in R, I suspect that this may instead simply be a case of costly tradition, where researchers were taught MATLAB as students and pay for it as re

Re: [R] problem with writing data to *.xls file

2009-01-23 Thread Hans-Peter Suter
> I read data from *.xls file and i did some caliculations on that data and > now i have to create a column in the same .xls file > i tried it with *write.xls() *but the thing is it deleted all the columns > previously presented in that file and it created a column and inserted data > can any one

Re: [R] Unexpected behaviour of the as.Date (was: Error as.Date on Invalid Dates)

2009-01-23 Thread Marie Sivertsen
Thank you Greg for your explanations. I think you explained the problem clearly now. Mvh. Marie On Thu, Jan 22, 2009 at 10:24 PM, Greg Snow wrote: > Comments interspersed below > > From: Marie Sivertsen [mailto:mariesiv...@gmail.com] > Sent: Thursday, January 22, 2009 1:17 PM > To: Greg Snow

Re: [R] can't load rJava in R 2.8.1 on Windows XP

2009-01-23 Thread Prof Brian Ripley
Most likely Java is not in place, including in the DLL search path. On Fri, 23 Jan 2009, drflxms wrote: Dear community, unfortunately I did not manage load the rJava package receiving the following error-message: library("rJava") Error in inDL(x, as.logical(local), as.logical(now), ...) :

Re: [R] Returning NA from lm

2009-01-23 Thread Prof Brian Ripley
See ?na.exclude On Fri, 23 Jan 2009, Neil Beddoe wrote: Hi. I need to apply run a regression analysis for groups of data of fixed length:100 As, 100 Bs, 100 Cs etc. eg x Key Value A 1 A 21.2 A 4 A 6.5 ...repeat 96 times with differing values of A B 1 B

[R] Write to multiple connections or multiple text files

2009-01-23 Thread Andersson, Jafet
Hi all, I want to modify a large number of text files (ca 4000) by replacing a value found on a particular line in them with a value from an R object. For a single file I would normally use: con<-file ("foo.txt", open="r+") content<-readLines(con)

Re: [R] Does anyone has this paper in pdf?

2009-01-23 Thread Carlos J. Gil Bellosta
> Note there is a link to issues dealing with teaching material, and I'd > imagine colleagues at your institution are likely to have the same access > rights, so technically its just as easy to send them a link to download a > paper themselves. Hello, On this point, I remember taking courses at u

Re: [R] problem in appending data into*.csv file

2009-01-23 Thread jim holtman
You can probably use one of the 'apply' functions, but it is hard to tell you which one since you did not provide commented, minimal, self-contained, reproducible code, or an example of what you thought the output should look like. On Fri, Jan 23, 2009 at 2:28 AM, venkata kirankumar wrote: > Hi a

Re: [R] Write to multiple connections or multiple text files

2009-01-23 Thread jim holtman
The solution you have seems to read in all the lines of data at once, operate on them and then write them out as a whole chunck. Having multiple connections open won't really help since I/O is serial. So is the code you included the actual code, or just an example? It would help to see what the

[R] 3d scatter plot with both error bars and a flexibly fitted surface

2009-01-23 Thread Sean Zhang
Dear R-helpers: I, an entry level R user, wonder how make a 3d scatter plot with both error bars and a flexibly fitted surface. Can anyone eligthen me? Many Thanks in advance. -Sean [[alternative HTML version deleted]] __ R-help@r-project

[R] Multifractal detrended fluctuation analysis

2009-01-23 Thread Dixon, James
Apologies for re-posting. I mistakenly sent embedded text in my initial post. Sorry, I'm new at this. Best, - J. Dixon Dear R-users, Has anyone written a function for multifractal detrended fluctuation analysis? The "fractal" package does mono-fractal DFA, but not multifractal as fa

Re: [R] Does anyone has this paper in pdf?

2009-01-23 Thread hadley wickham
On Wed, Jan 21, 2009 at 4:45 PM, wrote: > de Jong, S. (1993) SIMPLS: an alternative approach to partial least squares > regression. Chemometrics and Intelligent Laboratory Systems, 18, 251–263 Learn to use interlibrary loan: http://www.lib.iastate.edu/services1/ill_info.html Hadley -- http:/

Re: [R] can't load rJava in R 2.8.1 on Windows XP

2009-01-23 Thread Duncan Murdoch
On 1/23/2009 7:38 AM, drflxms wrote: Dear community, unfortunately I did not manage load the rJava package receiving the following error-message: library("rJava") Error in inDL(x, as.logical(local), as.logical(now), ...) : kann shared library 'C:/Programme/R/2.8.1/library/rJava/libs/rJava.dl

[R] forecasting error?

2009-01-23 Thread diego Diego
Hello everybody! I have an ARIMA model for a time series. This model was obtained through an auto.arima function. The resulting model is a ARIMA(2,1,4)(2,0,1)[12] with drift (my time series has monthly data). Then I perform a 12-step ahead forecast to the cited model... so far so good... but when

Re: [R] ggplot2 example

2009-01-23 Thread hadley wickham
> As I recall that is a known bug in the current version of ggplot2. That's right - because of an underlying bug in R which will be fixed in the next release of R and worked around in the next release of ggplot2. Hadley -- http://had.co.nz/ __ R-hel

[R] Dates in Common

2009-01-23 Thread Tom La Bone
I have two collections of dates and I want to figure out what dates they have in common. This is not giving me what I want (I don't know what it is giving me). What is the best way to do this? Tom > data1 [1] "1948-02-24 EST" "1949-04-12 EST" "1950-05-29 EDT" "1951-05-21 EDT" [5] "1951-12-20 E

Re: [R] Dates in Common

2009-01-23 Thread Whit Armstrong
you want: ans <- intersect(data1,data2) class(ans) <- c("POSIXt","POSIXct") I personally think intersect should preserve the class of the object (if both args have the same class), but I think r-core has a different opinion. -Whit On Fri, Jan 23, 2009 at 9:02 AM, Tom La Bone wrote: > > I have

Re: [R] forecasting error?

2009-01-23 Thread Gabor Grothendieck
See last line on every message to r-help and note the reproducible part. One problem may be that your auto.arima call has no xreg yet your prediction has newxreg. On Fri, Jan 23, 2009 at 8:48 AM, diego Diego wrote: > Hello everybody! > I have an ARIMA model for a time series. This model was obtai

Re: [R] how to study the lead and lag relation of two time series?

2009-01-23 Thread Jeffrey J. Hallman
Yes, it's called Ocular Econometrics. You plot both series on the same chart and use your onboard pattern detector. If you can't see it on the plot, it's unlikely that any correlations you find in other ways will have much predictive power, and that's the only kind of relationship that counts. I

Re: [R] can't load rJava in R 2.8.1 on Windows XP

2009-01-23 Thread drflxms
Dear Mr. Murdoch, Dear Mr. Ripley, Dear Mr. Wang, thank you very much for your quick and efficient help! It is exactly as Duncan explained it: Including jvm.dll in PATH solved the problem immediately. Everything works fine now. The only thing is, that I do not understand why I had to do this manu

[R] Reading nc files

2009-01-23 Thread Magdalena Lucini
Dear all, I have to open and read several netCDF (.nc) files. I installed the ncdf package and everything works fine. The problem is that I also have several netCDF files that are also ziped. These files are in the form,: nc_file.gz I tried different ways (within R) to unzip and read them, but

Re: [R] how to get a primitive function object

2009-01-23 Thread Wacek Kusnierczyk
Duncan Murdoch wrote: > Wacek Kusnierczyk wrote: >> Duncan Murdoch wrote: >> >>> You can use parent.frame() as the pos or envir argument to assign(), >>> and then the assignment happens in the caller's frame. And assign() >>> is also another way out if you overwrite <- with something that >>> d

Re: [R] Is there any function can be used to compare two probit models made from same data?

2009-01-23 Thread David Freedman
Hi - wouldn't it be possible to bootstrap the difference between the fit of the 2 models? For example, if one had a *linear* regression problem, the following script could be used (although I'm sure that it could be improved): library(MASS); library(boot) #create intercorrelated data Sigma <- ma

Re: [R] vegan metaMDS

2009-01-23 Thread Michael Denslow
> Hi, Hi Radu, > > I'm trying to use metaMDS with a dissimilarity matrix > of angles, not > Bray-Curtis, and I wanted to know if there is an in-built > function to > produce a plot of stress values against dimensions, that > could be used to > determine the 'true' dimension of the solution. I

Re: [R] can't load rJava in R 2.8.1 on Windows XP

2009-01-23 Thread Duncan Murdoch
On 1/23/2009 9:44 AM, drflxms wrote: Dear Mr. Murdoch, Dear Mr. Ripley, Dear Mr. Wang, thank you very much for your quick and efficient help! It is exactly as Duncan explained it: Including jvm.dll in PATH solved the problem immediately. Everything works fine now. The only thing is, that I do n

[R] The Quality & Accuracy of R

2009-01-23 Thread Muenchen, Robert A (Bob)
Hi All, We have all had to face skeptical colleagues asking if software made by volunteers could match the quality and accuracy of commercially written software. Thanks to the prompting of a recent R-help thread, I read, "R: Regulatory Compliance and Validation Issues, A Guidance Document for t

[R] Table Modification

2009-01-23 Thread Derek Ogle
I am trying to construct a two-way table where, instead of printing the two-way frequencies in the table, I would like to print the values of a third variable that correspond to the frequencies. For example, the following is easily constructed in R > fact1 <- factor(sample(LETTERS[1:3],10,r

Re: [R] Dates in Common

2009-01-23 Thread r...@quantide.com
The problem is in the intersect function that does x = as.vector(x) and therefore transforms date vector into a numeric . Try to: d1 = as.character(data1) ; d2 = as.character(data2) d = intersect(d1, d2) data = as.Date(d) A. Tom La Bone wrote: I have two collections of dates and I want to fig

[R] extract certain months toyears (zoo)

2009-01-23 Thread Bastian Pöschl
Dear useRs and developeRs, In my diploma thesis I work with a daily time series of glacier runoff data. I did already aggregate them to monthly means etc. Now i want to use just the summer values (I am indecisive by now what that means, but let's make it easy and use months like June). Is there a

[R] Histogram for grouped data in R

2009-01-23 Thread darthgervais
I have grouped data in this format Size -- Count 0-10 -- 15 10-20 -- 25 20-50 -- 10 50-100 -- 5 I've been trying to find a way to set this up with the proper histogram heights, but can't seem to figure it out. So any help would be much appreciated! -- View this message in context: http://www

[R] Outputing residuals

2009-01-23 Thread Josh B
Hello, I was wondering if someone could tell me how to output, to file, the residuals from a REML model-fit. The type of residuals I am interested in are the simple "original raw values - model fit" type. Thanks in advance, Josh B. [[alternative HTML version deleted]]

Re: [R] ggplot seq

2009-01-23 Thread Felipe Carrillo
Thanks Thierry: The use of levels is what I needed, thanks for your help. From: ONKELINX, Thierry Subject: RE: [R] ggplot seq To: mazatlanmex...@yahoo.com, r-h...@stat.math.ethz.ch Date: Friday, January 23, 2009, 3:01 AM Dear Felipe, Provide a dummy sample if your dataset is big or

Re: [R] Table Modification

2009-01-23 Thread r...@quantide.com
If I understood propelly > tapply(fact3, list(fact1, fact2) , paste, collapse = ",") A. Derek Ogle wrote: I am trying to construct a two-way table where, instead of printing the two-way frequencies in the table, I would like to print the values of a third variable that correspond to the freque

Re: [R] Histogram for grouped data in R

2009-01-23 Thread Vincent Goulet
Le ven. 23 janv. à 08:55, darthgervais a écrit : I have grouped data in this format Size -- Count 0-10 -- 15 10-20 -- 25 20-50 -- 10 50-100 -- 5 I've been trying to find a way to set this up with the proper histogram heights, but can't seem to figure it out. So any help would be much app

Re: [R] Histogram for grouped data in R

2009-01-23 Thread Jorge Ivan Velez
Hi, Try this: x<-c(15,25,10,5) names(x)<-c('0-10','10-20','20-50','50-100') barplot(x,space=0,xlab='Size',ylab='Count',col=1:4) See ?barplot for more information. HTH, Jorge On Fri, Jan 23, 2009 at 8:55 AM, darthgervais wrote: > > I have grouped data in this format > > Size -- Count > 0-1

Re: [R] Is it possible for R to import a SigmaPlot file?

2009-01-23 Thread Felipe Carrillo
Check the package 'foreign'. It can read data from SPSS,Minitab,SAS,Systat (sigmaplot is part of Systat) etc. I also use Sigmaplot and an easy workaround is to convert the sigmaplot file to csv or xls file and then read it into R. Felipe D. Carrillo Supervisory Fishery Biologist Department o

Re: [R] Returning NA from lm

2009-01-23 Thread Neil Beddoe
I tried that I'm afraid. I still get values for groups with missing data. I think na.exclude just ignores the NAs but I want it to return NA. Where one of the values is NA. -Original Message- From: Prof Brian Ripley [mailto:rip...@stats.ox.ac.uk] Sent: 23 January 2009 13:04 To: Neil

Re: [R] Table Modification

2009-01-23 Thread Derek Ogle
Yes, that was exactly what I was looking for. Very concise. Thank you. My "real" example has many more items in each cell. I will now have to figure out how to put a "carriage return" after, say, every fourth item. Nevertheless, thank you very much for the quick and accurate answer. -Orig

Re: [R] 3d scatter plot with both error bars and a flexibly fitted surface

2009-01-23 Thread Dieter Menne
Sean Zhang gmail.com> writes: > I, an entry level R user, wonder how make a 3d scatter plot with both error > bars and a flexibly fitted surface. For regular grid data, I found interp.loess in package tpg easiest to use to compute the fine grid required for the plot. For irregular data, check

Re: [R] extract certain months toyears (zoo)

2009-01-23 Thread Gabor Grothendieck
Please read the last line to every post on r-help particularly noting the reproducible part. Assuming you have a series such as z below and want June, July and August of each year: > library(zoo) > set.seed(1) > z <- zoo(rnorm(25), as.yearmon("2000-01") + 0:24/12) > z[format(time(z), "%m") %in% c

[R] forward slash vs double backslash R and Tinn-R

2009-01-23 Thread Farrel Buchinsky
I installed the newest version of R and once again ran into problem with Tinn-R failing when trying to use the R explorer. I had this problem once before and solved it when I added the following .trPaths = c( 'C:/Documents and Settings/fbuchins/Application Data/Tinn-R/tmp/', 'C:/Documents and Sett

Re: [R] forward slash vs double backslash R and Tinn-R

2009-01-23 Thread Farrel Buchinsky
The only apparent reason for the failure is that the elegant line using Sys.getenv denerates filenames with double backslashes instead of forward slashes. I am working in Windows XP and I thought that R could use double backslashes or a single forward slash. So what am I not understanding about th

Re: [R] forward slash vs double backslash R and Tinn-R

2009-01-23 Thread Duncan Murdoch
On 1/23/2009 11:10 AM, Farrel Buchinsky wrote: I installed the newest version of R and once again ran into problem with Tinn-R failing when trying to use the R explorer. I had this problem once before and solved it when I added the following .trPaths = c( 'C:/Documents and Settings/fbuchins/Appl

Re: [R] text vector clustering

2009-01-23 Thread Stefan Th. Gries
Hans-Joerg Bibiko's function Levenshtein would help; cf. below for an example (very clumsy with two loops, but you can tweak that with apply stuff). HTH, STG levenshtein <- function(string1, string2, case=TRUE, map=NULL) { # levenshtein algorithm in R # #

Re: [R] text vector clustering

2009-01-23 Thread Stefan Th. Gries
On Fri, Jan 23, 2009 at 08:28, Stefan Th. Gries wrote: > Hans-Joerg Bibiko's function Levenshtein would help; cf. below for an > example (very clumsy with two loops, but you can tweak that with apply > stuff). Like this maybe (sorry, should've thought about that earlier): [...] x<-rep(all.names,

[R] glm binomial loglog (NOT cloglog) link

2009-01-23 Thread William Simpson
I would like to do an R glm() with family = binomial(link="loglog") Right now, the cloglog link exists, which is nice when the data have a heavy tail to the left. I have the opposite case and the loglog link is what I need. Can someone suggest how to add the loglog link onto glm()? It would be lov

Re: [R] forward slash vs double backslash R and Tinn-R

2009-01-23 Thread Keith Jewell
I'm on Windows XP and it works fine for me, so the "only apparent reason for the failure" may not be the real reason. "BUT IT FAILS" isn't very explicit. If your .trPaths definition works for you, why not use it? As Duncan Murdoch said, you're really asking in the wrong place. There's a forum s

[R] Plot, lines and disordered x and y

2009-01-23 Thread Todor Kondic
Hello, I have 2d data where x coordinate is not given in usual ascending order (x1,...,x1+l; l>0), and instead in another, regular, but not ascending or descending order (for illustration: x1,-x1,x1+dx1,-x1-dx1,).y is an array which corresponds to the way x is ordered. I have noticed that givi

[R] Stat textbook recommendations?

2009-01-23 Thread Monte Milanuk
Hello, I'm looking for a textbook that can explain some of the math behind the intro-to-intermediate stuff like ANOVA, multiple regression, non- parametric tests, etc. A little background: I took an intro stats course last year and would like to further my education. Being as that was the

Re: [R] Table Modification

2009-01-23 Thread jim holtman
?strwrap On Fri, Jan 23, 2009 at 10:47 AM, Derek Ogle wrote: > Yes, that was exactly what I was looking for. Very concise. Thank you. > > My "real" example has many more items in each cell. I will now have to > figure out how to put a "carriage return" after, say, every fourth item. > > Nevert

Re: [R] can't load rJava in R 2.8.1 on Windows XP

2009-01-23 Thread Dieter Menne
Duncan Murdoch stats.uwo.ca> writes: > > If you look at rJava:::.onLoad now that you can load the package, > you'll see that it goes through a number of tests to try to find the > right path. Slightly different for me, but failure: jvm.dll is on path (checked successfully with "where jvm.d

[R] Categorical Variables and glm()

2009-01-23 Thread Stephen Collins
When including categorical variables in a regression, the default in R is to set the first level as the base. Is there an option to specify a different level as the base? Regards, Stephen Collins, MPP | Analyst Health & Benefits | Aon Consulting [[alternative HTML version deleted]]

[R] New international competition for the Digital Humanities

2009-01-23 Thread Paul Gilbert
(Slightly off topic and outside my area - but this may be of interest to the R community) WASHINGTON (January 16, 2009) -- Today, a new international competition called the "Digging into Data Challenge" was announced by four leading research agencies: the Joint Information Systems Committee (J

Re: [R] Returning NA from lm

2009-01-23 Thread Neil Beddoe
If anyone's interested, I got round it by doing: tryCatch(lm(data~model,na.action=na.fail),error=function(err){NA}) -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Neil Beddoe Sent: 23 January 2009 15:40 To: 'Prof Brian Ripley' C

[R] "latex" in Hmisc: cell formating

2009-01-23 Thread Tao Shi
Hi Dieter, Thank you for pointing out the website. From the website it seems the bug has been fixed early 2008 (see http://biostat.mc.vanderbilt.edu/trac/Hmisc/changeset/582 ). So I upgraded my Hmisc package to 3.4-4, which was published on 11/3/2008 and hoped it would work. However, the pr

[R] Anova and unbalanced designs

2009-01-23 Thread Skotara
Dear R-list! My question is related to an Anova including within and between subject factors and unequal group sizes. Here is a minimal example of what I did: library(car) within1 <- c(1,2,3,4,5,6,4,5,3,2); within2 <- c(3,4,3,4,3,4,3,4,5,4) values <- data.frame(w1 = within1, w2 = within2) valu

Re: [R] Categorical Variables and glm()

2009-01-23 Thread Marc Schwartz
on 01/23/2009 11:10 AM Stephen Collins wrote: > When including categorical variables in a regression, the default in R is > to set the first level as the base. Is there an option to specify a > different level as the base? See ?relevel and the See Also's listed therein. HTH, Marc Schwartz _

Re: [R] Categorical Variables and glm()

2009-01-23 Thread Daniel Malter
Hi, contrasts(yourvariablename)=contr.treatment(levels(yourvariablename),base=3) 3 is the number of the category that you want to be your baseline. Replace accordingly. Cheers, Daniel - cuncta stricte discussurus - -Ursprüngliche Nachricht-

[R] R stepping through multiplie interactions

2009-01-23 Thread ppeetteerr
I have a lm in R in the form model <- lm( Z ~ A*B*C*D,data=mydata) I want to run the model and include all interactions expect the 4 way (A:B:C:D) is there an easy way of doing this? I then want to step down the model eliminating the non-significant terms I understand step() does this but how woul

Re: [R] ggplot seq

2009-01-23 Thread Felipe Carrillo
Actually 'levels' works OK by ordering the x axis labels but since I have 52 weeks it gets too crowded. Here's part of my dataset with a reproducible example. sampDat <- "Week FryPassage 27 665 28 2232 29 9241 30 28464 31 41049 32 82216 33 230411 34 358541 35 747839 36 459682 37 609567 38 979475

Re: [R] Stat textbook recommendations?

2009-01-23 Thread Greg Snow
I like: Applied Linear Statistical Models by Neter, Kutner, Nachtsheim, and Wasserman (McGraw Hill) It is not specific to any stats package, but it gives a good mix of theory behind the routines and how to apply them and covers a good breadth of material. A must have for statistics and R is:

Re: [R] glm binomial loglog (NOT cloglog) link

2009-01-23 Thread Ken Knoblauch
William Simpson gmail.com> writes: > I would like to do an R glm() with > family = binomial(link="loglog") > Right now, the cloglog link exists, which is nice when the data have a > heavy tail to the left. I have the opposite case and the loglog link > is what I need. Can someone suggest how to ad

Re: [R] R stepping through multiplie interactions

2009-01-23 Thread Chuck Cleland
On 1/23/2009 12:44 PM, ppeetteerr wrote: > I have a lm in R in the form > model <- lm( Z ~ A*B*C*D,data=mydata) > I want to run the model and include all interactions expect the 4 way > (A:B:C:D) is there an easy way of doing this? I then want to step down the > model eliminating the non-significan

[R] plotting curve in xYplot -- using panel.curve

2009-01-23 Thread John Poulsen
Hello, I am trying to plot a curve over points plotted with se's in xYplot (see example below). I can get Figure 1 below to plot the data with error. However, I keep getting a the error message "Error using packet 1 object "y" not found" Can anyone see what I am doing wrong? Thanks! John

Re: [R] R stepping through multiplie interactions

2009-01-23 Thread Greg Snow
Z ~ (A+B+C+D)^3 means give all main effects and interactions up to the 3 way interactions, but not above (change ^3 to ^2 to limit to 2 way interactions). You can do a semi manual stepwise procedure using the add1 and drop1 commands or the addterm and dropterm commands in the MASS package. But

Re: [R] Stat textbook recommendations?

2009-01-23 Thread Daniel Viar
You might want to check out the following: http://www.stochas.org/ http://www1.appstate.edu/~arnholta/PASWR/index.htm http://turtle.gis.umn.edu/pmwiki/pmwiki.php/StatisticsandDatawithR/HomePage http://www.janehorgan.com/ I own all of these books and like them. The book by Dr. Jan Horgan: "Probab

Re: [R] Stat textbook recommendations?

2009-01-23 Thread Christopher W. Ryan
If you don't want to be on your own, and you are looking for more statistics courses than you have available locally, Texas A&M University statistics department offers some single courses, a 4-course certificate, and an entire masters degree, all online, no campus visits required. I am in their ma

[R] Appending objects created using filehash package

2009-01-23 Thread Brigid Mooney
Hi, I am working with a very large dataset, and am using the 'filehash' package to manage such a large file. While I have no problem accessing objects that I load into a database, I was hoping there is a better way to append to objects already in the database. The only way I know now to append t

Re: [R] Plot, lines and disordered x and y

2009-01-23 Thread Todor Kondic
Ok, here is a bit more information: R is version 2.7.1 (2008-06-23) A constructed example: > x<-c(1,-1,2,-2,3,-3,4,-4,5,-5) > y<-c(1,0,2,0,3,0,4,0,5,0) > plot(x,y,type='l') #bad > plot(x,y) # this is how it should look like So what we should see here is a flat y=0 for x<0 and identit

Re: [R] how to get a primitive function object

2009-01-23 Thread Yi Zhang
On Fri, Jan 23, 2009 at 5:15 AM, Patrick Burns wrote: > If I understand properly, you want '<-' to be > a generic function, which it currently isn't. > There may be a way to fake that (I can't think > of any). > > But I'm wondering if you should rethink what > you want. The only reason that I can

Re: [R] Write to multiple connections or multiple text files

2009-01-23 Thread Charles C. Berry
On Fri, 23 Jan 2009, Andersson, Jafet wrote: Hi all, I want to modify a large number of text files (ca 4000) by replacing a value found on a particular line in them with a value from an R object. For a single file I would normally use: con<-file ("foo.txt", open="r+") content<-

[R] compound outcome variables (not specifically R-related)

2009-01-23 Thread Christopher W. Ryan
I would like to try to do a journal club session for my family practice residents on the uses, and especailly the pitfalls, of compound outcome variables, like "stroke or myocardial infarction or coronary bypass surgery." They appear frequently in clinical trial literature. Can anyone recommend an

Re: [R] Plot, lines and disordered x and y

2009-01-23 Thread Jorge Ivan Velez
Dear Todor, How about this? x<-c(1,-1,2,-2,3,-3,4,-4,5,-5) y<-c(1,0,2,0,3,0,4,0,5,0) DF<-data.frame(x,y) plot(with(DF,DF[order(x),]),type='o') HTH, Jorge On Fri, Jan 23, 2009 at 1:41 PM, Todor Kondic wrote: > Ok, here is a bit more information: > > R is version 2.7.1 (2008-06-23) > > A const

Re: [R] how to get a primitive function object

2009-01-23 Thread Yi Zhang
On Fri, Jan 23, 2009 at 9:40 AM, Wacek Kusnierczyk wrote: > you might want to specify what 'completely unrecoverable' means, and > what approaches are allowed. > > for the former, i guess that: > - 'incompletely recoverable' means that there is at least one function > name in the global environme

Re: [R] Plot, lines and disordered x and y

2009-01-23 Thread Ben Bolker
Todor Kondic gmail.com> writes: > > Ok, here is a bit more information: > > R is version 2.7.1 (2008-06-23) > > > So what we should see here is a flat y=0 for x<0 and identity for x>0. > Instead, we have a saw-like shape where e.g y(x=-1) is connected to > y(x=1) . > > This is of course min

Re: [R] Stat textbook recommendations?

2009-01-23 Thread Peter Dalgaard
(resending to include r-help) Monte Milanuk wrote: Hello, I'm looking for a textbook that can explain some of the math behind the intro-to-intermediate stuff like ANOVA, multiple regression, non- parametric tests, etc. A little background: I took an intro stats course last year and woul

Re: [R] Is there any function can be used to compare t wo probit models made from same data?

2009-01-23 Thread Dylan Beaudette
On Friday 23 January 2009, David Freedman wrote: > library(MASS); library(boot) > #create intercorrelated data > Sigma <- matrix(c(1,.5,.4,  .5,1,.8,  .4,.8,1),3,3) > Sigma > dframe<-as.data.frame(mvrnorm(n<-200, rep(0, 3), Sigma)) > names(dframe)<-c('disease','age','ht') #age and ht are predictors

Re: [R] Plot, lines and disordered x and y

2009-01-23 Thread hadley wickham
>> >> This is of course minor (actually asymptotically, no annoyance at >> all). I am just mentioning it for 'completness' sake and because a >> divinely ideal plotting function should cope with data given in any >> order. >> > > The problem here is that a divinely ideal plotting function > for o

[R] Box Cox parameter for time series

2009-01-23 Thread diego Diego
Hello R-experts, I want to ask I anyone knows a way to obtain a suitable value for the parameter of the box-cox transformation for time series (aiming to an Arima fit). Adittionally, I need to implement this to a list with a lot of series (about 5300), so if the method is suitable for an FOR-ruti

  1   2   >