[R] Help with dudi.pca

2009-01-23 Thread Michael Kubovy
Dear R-helpers, I have two data frames, op and em4: str(op) 'data.frame': 37 obs. of 5 variables: $ m: num 0.202 0.336 0.122 0.139 0.14 ... $ lln : num 0.798 0.643 0.863 0.835 0.823 ... $ rrn : num 0.789 0.702 0.894 0.895 0.923 ... $ asym2: num 0.177 0.304 0.108 0.187 0.274

Re: [R] Problem with colormodel in pdf driver

2009-01-23 Thread Jorge Ivan Velez
Hi Luis, Following David's suggestion, it worked for me: pdf('exp.pdf',colormodel='grey') # Note the change here :) barplot(table(subset(iris,Petal.Width1)$Species)) dev.off() Here is my session info: sessionInfo() R version 2.8.1 Patched (2009-01-01 r47434) i386-pc-mingw32 locale:

Re: [R] how to prevent duplications of data within a loop

2009-01-23 Thread Jorge Ivan Velez
Dear Juliet, Why don't you use *apply() instead a for() loop? Here is a starting point: apply(myData[,-1],2,function(x) coefficients(lm(response~x))) var1 var2 var3 (Intercept) 0.10438369 0.10415221 0.1176728 x -0.03354243 0.02429041 -0.2240759 Note

Re: [R] R startup and shutdown question

2009-01-23 Thread Dr. S. B. Nguah
Hi, ?.First ?.Last Sammy Philip James 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 2. source another file automatically. Then, when I shutdown R, I want R to: 1. remove(list=ls())

Re: [R] Problem with colormodel in pdf driver

2009-01-23 Thread Prof Brian Ripley
'gray' is what is in the code: 'grey' uses rgb -- just look at the pdf produced. The issue is that the wrong ('stroke' not 'fill') colour is set in ht 'gray' colormodel. On Fri, 23 Jan 2009, David Winsemius wrote: Try changing the color to grey. Despite the help pages saying this:

Re: [R] Help with dudi.pca

2009-01-23 Thread Mark Difford
Hi Michael, coinertia(op.dudi, em3.dudi) Error in paste(COCA, 1:n.axes, sep = ) : element 2 is empty; Something makes me think that this is not the full error message, or the correct error message, or that you have something else in your call to coinertia? Why? Because you also list

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

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

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 good

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,

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

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

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

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

[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$variablevalue !is.na(data$variable),])/nrow(data) works but is very ineffective and CPU consuming

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

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

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

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

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

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

[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

[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: [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 greg.s...@imail.org wrote: Comments interspersed below From: Marie Sivertsen [mailto:mariesiv...@gmail.com] Sent: Thursday, January 22, 2009 1:17 PM

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

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

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] 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 far

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

2009-01-23 Thread hadley wickham
On Wed, Jan 21, 2009 at 4:45 PM, aim...@iastate.edu 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

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

[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] 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 EST

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 boo...@gforcecable.com

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 dhab...@gmail.com wrote: Hello everybody! I have an ARIMA model for a time series. This

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.

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

[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 doesn't work; just

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 -

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 am

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

[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

[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 -

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

[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

[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:

[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 thierry.onkel...@inbo.be 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

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

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

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 darthgerv...@yahoo.ca wrote: I have grouped data in this format Size

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

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.

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

2009-01-23 Thread Dieter Menne
Sean Zhang seanecon at 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

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(06, 07,

[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

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

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

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 stgr...@gmail.com 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): [...]

[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

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

[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; l0), 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

[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 do...@northland.edu 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

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

2009-01-23 Thread Dieter Menne
Duncan Murdoch murdoch at 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

[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

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'

[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

[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) values

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

[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

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 william.a.simpson at 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

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-significant

[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:

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 AM 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

[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

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 x0 and identity for

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 pbu...@pburns.seanet.com 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

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+)

[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 any

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 doliche...@gmail.com wrote: Ok, here is a bit more information: R is version 2.7.1

  1   2   >