Re: [R] blowup portion of graph beside it

2009-01-22 Thread Jim Lemon
rajesh j wrote: Hi, I'd like to blow up portions of my graph and put it in boxes beside the graph.Is there an addon to do this? Hi Rajesh, You must be reading my mind. I'm currently working on a function to produce those big-plot-with-blown-up-section-next-to-it illustrations. If you can

Re: [R] dimnames in pkg "ipred"

2009-01-22 Thread Dieter Menne
Häring, Tim (LWF lwf.bayern.de> writes: > > OK, the information I send to the list were rather sparse. Sorry for that! > I just tried the command with the recent Version of R and ipred. The error message is the same. > I want to create a classification model. My data consist of 5414 observations

Re: [R] "latex" in Hmisc: cell formating

2009-01-22 Thread Dieter Menne
Tao Shi hotmail.com> writes: > ## I'm using R 2.8.0 on WinXP, Hmisc_3.4-3 > > > table1 <- matrix(10, 180,7) > > cell.format <- matrix("", ncol=7, nrow=180) > > cell.format[c(seq(3,180,6),seq(4,180,6)),] <- "color{red}" > > cell.format[c(seq(5,180,6),seq(6,180,6)),] <- "color{green}" > > > > lat

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

2009-01-22 Thread venkata kirankumar
Hi all, I got a problem with appending data into the *.csv file like abc<-read.csv("bbb.csv") # reading data from one csv file abc1<-mean(subset(abc,Group=="A")) hear i have to creat a .csv file and in that i have to create column's with names *group, mean* and farther i have to caliculate for

Re: [R] extension of ftable

2009-01-22 Thread Dieter Menne
Santosh gmail.com> writes: > Is there way to combine grouped and consolidated summaries into a formatted > multidimensional summary table? > e.g. > > malefemale total > country state > usa > new jersey10 20 30 > new york 23

[R] comparing rfsim (spatial module of splus) and krige (gstat)

2009-01-22 Thread Trieu Minh
Hi everybody, Can anybody tell me what is the difference between work done by rfsim() and krige()? I am simulating a random field using a spherical model got by a variogram analysis? rfsim() is a function of S+SpatialStat module with Splus.With this, We cannot get over if grid lager 120x120.

Re: [R] dimnames in pkg "ipred"

2009-01-22 Thread Häring, Tim (LWF)
OK, the information I send to the list were rather sparse. Sorry for that! I just tried the command with the recent Version of R and ipred. The error message is the same. I want to create a classification model. My data consist of 5414 observations and 98 variables whereof 33 are numeric, the rem

Re: [R] predict function problem for glmmPQL

2009-01-22 Thread Kingsford Jones
On Thu, Jan 22, 2009 at 10:48 PM, Chun Zhang wrote: > Hi all, > I am using cross-validation to validate a generalized linear mixed effects > model fitted using glmmPQL. i found that the predict function has a problem > and i wonder if anyone has encountered the same problem? > > glmm1 = glmmPQL(

[R] predict function problem for glmmPQL

2009-01-22 Thread Chun Zhang
Hi all, I am using cross-validation to validate a generalized linear mixed effects model fitted using glmmPQL. i found that the predict function has a problem and i wonder if anyone has encountered the same problem? glmm1 = glmmPQL(y~aX+b,random=~1|sample,data=traindata) predict(glmm1,newdata=te

[R] Freeware or opensource approach to import SigmaPlot data into R?

2009-01-22 Thread Jason Rupert
Mr. McKinney posted the below, but at this point I am looking for the lowest cost solution possible, so OpenSource or Freeware is preferable.   Thank you again for your help. P.S. Maybe the answer is to have my customer output there data in a format that can be imported into R.  Has anyone do

Re: [R] maintaining variable types in data frames

2009-01-22 Thread jim holtman
How about this: > Y <- as.data.frame(matrix(c("c","d",NA,4),2,2), stringsAsFactors=FALSE) > X <- as.data.frame(matrix(c("a","b",1,2),2,2), stringsAsFactors=FALSE) > Y V1 V2 1 c 2 d4 > X V1 V2 1 a 1 2 b 2 > Y[] <- lapply(seq(ncol(Y)), function(.col){ + ifelse(is.na(Y[,.col]), X

[R] extension of ftable

2009-01-22 Thread Santosh
Dear Rxperts! Is there way to combine grouped and consolidated summaries into a formatted multidimensional summary table? e.g. malefemale total country state usa new jersey10 20 30 new york 23 31 54 missou

Re: [R] maintaining variable types in data frames

2009-01-22 Thread Mike Miller
On Thu, 22 Jan 2009, Mike Miller wrote: Suppose X and Y are two data frames with the same structures, variable names and dimensions but with different data and different patterns of missing. I want to replace missing values in Y with corresponding values from X. I'll construct a simple two-b

Re: [R] Package installation failed

2009-01-22 Thread Odette Gaston
Hi Uwe and all, Error message was: error in normalizePath(path) : path[1]: no such file to load Many thanks, Odette On Fri, Jan 23, 2009 at 1:22 AM, Uwe Ligges wrote: > > > Odette Gaston wrote: > >> Hi folks, >> >> I am currently having the problem with using R 2.8.1 that I cannot install

[R] help

2009-01-22 Thread allen lou
hi everyone, Please help me to calculate copula in R . I already have the data but I don't know how to manipulate it..please do reply...I really need your help. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

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

2009-01-22 Thread Steven McKinney
Hi Jason Have you checked out Stat/Transfer? www.stattransfer.com They state they handle SYSTAT files, and SigmaPlot is a SYSTAT product. Stat/Transfer has a demo download you could use to test. I've used it to good effect (though for other than SYSTAT datasets) in the past. HTH Steven McKi

Re: [R] Confidence intervals in ccf()

2009-01-22 Thread David Winsemius
ccf passes its results to acf which than passes to plot.acf, an invisible function which can be made visible by the ":::" device: stats:::plot.acf plot.acf is where the CI get calculated and plotted. -- David Winsemius On Jan 20, 2009, at 12:25 PM, Shruthi Jayaram wrote: Hi, I have been

Re: [R] subset exact values

2009-01-22 Thread Charles C. Berry
On Thu, 22 Jan 2009, tsippel wrote: Hi- I need to subset the following data by the column 'dal' for values that equal the regular interval seq(0, 150, by=0.5) exactly excluding rows with irregular 'dal' values such as c(2.888958, 2.891620), etc. data<-data.frame(id=id, dal=dal, date=

Re: [R] Confidence intervals in ccf()

2009-01-22 Thread Gad Abraham
Shruthi Jayaram wrote: Hi, I have been running the ccf() function to find cross-correlations of time series across various lags. When I give the option of plot=TRUE, I get a plot that gives me 95% confidence interval cut-offs (based on sample covariances) for my cross-correlations at each lag. T

Re: [R] time date stamp since, january 1st 1970

2009-01-22 Thread Dirk Eddelbuettel
On 22 January 2009 at 17:39, zubin wrote: | Hello, we are receiving some data, sample below - with a weird time/date | stamp format, we need some help with R on converting this time date | stamp to a useable field in R, date and time in a data-frame. The | developer says its the number of mill

Re: [R] X matrix deemed to be singular;

2009-01-22 Thread Gad Abraham
Michele Santacatterina wrote: Hello, i'm tring to use a cox's model for a survival analysis. I have a dataset, this is a part: VOD SESSO fonte_sct donor RT_CGY STATOBMT TEMPO morto 1 0 F midrelated 1200 CP651 2 0 M

[R] subset exact values

2009-01-22 Thread tsippel
Hi- I need to subset the following data by the column 'dal' for values that equal the regular interval seq(0, 150, by=0.5) exactly excluding rows with irregular 'dal' values such as c(2.888958, 2.891620), etc. data<-data.frame(id=id, dal=dal, date=date, mu.x=mu.x) $dal [1] 0.00 0.

Re: [R] time date stamp since, january 1st 1970

2009-01-22 Thread David Winsemius
Since the starting date is the same as that of the POSIXct class, it should not be a big problem. Just divide by 1000. > as.POSIXct(1232558018624/1000, origin="1970-01-01") # throws an error if origin not set [1] "2009-01-21 17:13:38 EST" > > as.POSIXct(0/1000, origin="1970-01-01") [1] "197

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

2009-01-22 Thread Achim Zeileis
On Thu, 22 Jan 2009, Ben Bolker wrote: Greg Snow imail.org> writes: Many problems come as a result of users forgetting that they are smarter than the computer. I see 3 ways to remedy the problem: 1. Make computers that are as smart or smarter than people. 2. Make the programmers anticipat

[R] "latex" in Hmisc: cell formating

2009-01-22 Thread Tao Shi
Hi list, Could you explain the error I see here? Thanks! ## I'm using R 2.8.0 on WinXP, Hmisc_3.4-3 > table1 <- matrix(10, 180,7) > cell.format <- matrix("", ncol=7, nrow=180) > cell.format[c(seq(3,180,6),seq(4,180,6)),] <- "color{red}" > cell.format[c(seq(5,180,6),seq(6,180,6)),] <- "color{gr

[R] ggplot2 example

2009-01-22 Thread Felipe Carrillo
I need to plot two graphics just like the example below but for some reason your example crashes. Using facet_wrap seems to be the cause: library(ggplot2) upper <- with(economics, data.frame(date,value = psavert, position = "upper")) upper lower <- with(economics, data.frame(date,value = unemplo

[R] ggplot seq

2009-01-22 Thread Felipe Carrillo
Hi Hadley: Not sure if you received my email, so I am resending it again. I have dealt with this before and I can't remember how it got resolved. It is too much data to reproduce the example below(49.000 records) but all I am after is trying to get the x axis breaks. I want my x axis to go from 2

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

2009-01-22 Thread Ben Bolker
Greg Snow imail.org> writes: > Many problems come as a result of users forgetting that they are smarter than the computer. I see 3 ways to > remedy the problem: > > 1. Make computers that are as smart or smarter than people. > 2. Make the programmers anticipate every way that someone may use a

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

2009-01-22 Thread Jason Rupert
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 hits.  Thank for any feedback and insight you can provide.

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

2009-01-22 Thread M-J Milloy
Hello all: I'm hoping you can help me determine the source of this problem. I've just used read.csv to bring a small (581 rows, 9 vars) dataset into R (2.7.0., Mac OS 10.5.5). The dataset was created in Excel 2008 from a datadump from an Oracle database. I've done this many times before and had no

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

2009-01-22 Thread Wacek Kusnierczyk
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::`<-` to it. Or jus

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

2009-01-22 Thread Ben Bolker
jingjiang yan gmail.com> writes: > > hi, people > How can we compare two probit models brought out from the same data? > Let me use the example used in "An Introduction to R". > "Consider a small, artificial example, from Silvey (1970). > > On the Aegean island of Kalythos the male

[R] time date stamp since, january 1st 1970

2009-01-22 Thread zubin
Hello, we are receiving some data, sample below - with a weird time/date stamp format, we need some help with R on converting this time date stamp to a useable field in R, date and time in a data-frame. The developer says its the number of milliseconds since midnight, January 1, 1970. sample

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

2009-01-22 Thread Duncan Murdoch
On 22/01/2009 4:50 PM, Yi Zhang wrote: i was sort-of joking, though it's a real option if you want it. but seriously, there's no reason for the &%#* lamenting: x <- 1 '<-' = function(x,y) 0 x <- 2 # 0 .Primitive('<-')(x,2) x # 2 base::'<-'(x, 3) x # 3 base::'<-'('<-', base::'<-') x <- 4 x #

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

2009-01-22 Thread jingjiang yan
hi, people How can we compare two probit models brought out from the same data? Let me use the example used in "An Introduction to R". "Consider a small, artificial example, from Silvey (1970). On the Aegean island of Kalythos the male inhabitants suffer from a congenital eye disease,

Re: [R] Problems with statistics

2009-01-22 Thread David Winsemius
And to do the input section of the task, you should first read an introductory text and then refer to the help pages: ?read.table ?read.csv # same page And don't forget: http://www.R-project.org/posting-guide.html -- David Winsemius On Jan 22, 2009, at 4:33 PM, Mike Lawrence wrote: n.mea

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

2009-01-22 Thread Yi Zhang
> i was sort-of joking, though it's a real option if you want it. > > but seriously, there's no reason for the &%#* lamenting: > > x <- 1 > '<-' = function(x,y) 0 > x <- 2 > # 0 > > .Primitive('<-')(x,2) > x > # 2 > > base::'<-'(x, 3) > x > # 3 > > base::'<-'('<-', base::'<-') > x <- 4 > x > # 4 >

[R] detecting the source of memory consumption (example provided)

2009-01-22 Thread Juliet Hannah
I have read in a file (call it myData). The actual file is about 3000x30,000 columns and object.size() says myData takes: > 737910472/(1024^2) [1] 703.7263 Unfortunately, my program ends up using 40GB as indicated by maxvmem on Unix, which causes my department's cluster to stop working. Perhaps,

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

2009-01-22 Thread Wacek Kusnierczyk
Yi Zhang wrote: > # now what?? &%#* >> now you are really motivated to use '=' instead of '<-': >> >> x = 3 >> x >> # 3 >> >> vQ >> >> > > Thanks. That certainly is an option. But I want to preserve `<-`'s > functionality because I'm writing a package and I don't want to lim

Re: [R] Problems with statistics

2009-01-22 Thread Mike Lawrence
n.means = with(my.data,aggregate(n_red,list(n=n),mean)) plot(n.means) On Thu, Jan 22, 2009 at 5:17 PM, wrote: > Hello, > > I have the following csv file > > n, n_red > 1, 0 > 1, 1 > 2, 1 > 2, 1 > 3, 0 > 4, 1 > 4, 2 > 4, 3 > > I would like to plot thi

Re: [R] looping over a string

2009-01-22 Thread Greg Snow
Ah, I missed that. You can get the value from the string by using paste to create the name of the variable (as you already did), then use the 'get' function to get its value (the other direction of assign). But I would still suggest trying to use lists, then you can just use mylist[[ i ]] or m

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

2009-01-22 Thread Yi Zhang
On Thu, Jan 22, 2009 at 4:17 PM, Wacek Kusnierczyk wrote: > Duncan Murdoch wrote: >> On 1/22/2009 2:41 PM, Yi Zhang wrote: >>> Hi, >>> >>> I want to create an alias for the "<-" function and then later >>> overwrite it. Any idea how I can get the "<-" function object? I know >>> for other function

[R] Problems with statistics

2009-01-22 Thread odif
Hello, I have the following csv file n, n_red 1, 0 1, 1 2, 1 2, 1 3, 0 4, 1 4, 2 4, 3 I would like to plot this data. On the x-axis there should be n and on the y-axis the mean of all n_red where n is the according value on the x-axis. The plot s

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

2009-01-22 Thread Greg Snow
Comments interspersed below From: Marie Sivertsen [mailto:mariesiv...@gmail.com] Sent: Thursday, January 22, 2009 1:17 PM To: Greg Snow Cc: r-h...@stat.math.ethz.ch Subject: Re: [R] Unexpected behaviour of the as.Date (was: Error as.Date on Invalid Dates) [snip] For your question, the help p

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

2009-01-22 Thread Wacek Kusnierczyk
Duncan Murdoch wrote: > On 1/22/2009 2:41 PM, Yi Zhang wrote: >> Hi, >> >> I want to create an alias for the "<-" function and then later >> overwrite it. Any idea how I can get the "<-" function object? I know >> for other functions it's easy, something like "f <- seq" will do; how >> really no cl

[R] Apology for Multiple Posts

2009-01-22 Thread jimdare
Dear R-Users I sincerely apologise for the multiple posts yesterday afternoon. Apparently there was an error in the server here at work which resulted in the message being sent eight times. I am new to R, as you can probably tell from the majority of my posts, and I really appreciate all the hel

[R] User input in batch mode

2009-01-22 Thread Sebastien Bihorel
Dear R-users, [Sorry to have to send this again but my former posts were trimmed because of some embedded HTML code] readline is a nice function to get user input when one is working with the terminal. This function does not allow any interaction with the user when a script in batch mode (I

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

2009-01-22 Thread Wacek Kusnierczyk
Rolf Turner wrote: > > On 23/01/2009, at 12:49 AM, Neil Shephard wrote: > > s > 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 cop

[R] How to handle NA in C#, RDCOM

2009-01-22 Thread guox
I am using RDCOM as a data-transfer between R and C#.net. I got a question on datasets with missing data. For instance, if list = c(1,2,3,NA,5), in R, typeof(list) is integer but, in C#, I did not see a suitable data type for (1,2,3,NA,5). Of course, one can use is.na to transfer (1,2,3,NA,5) into

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

2009-01-22 Thread Yi Zhang
On Thu, Jan 22, 2009 at 3:06 PM, Duncan Murdoch wrote: > > get("<-") will give it to you, and > > `<-` <- function(x, y) cat("x=", x, "y=", y, "\n") > > will change it -- and will probably be the last effective thing you do in > that session, unless you're really careful: > >> x <- 1 >> x > [1] 1

Re: [R] looping over a string

2009-01-22 Thread Thomas Schwander
Greg Snow schrieb: I don't see right off why the one works and the other doesn't, but this looks like one of those cases that would be better done using a list rather than global variables. Instead of assigning the variables in the global workspace, create a list and assign them there. Then

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

2009-01-22 Thread Marie Sivertsen
Thank you Greg and Gabor for explanations. I have some further question below. On Thu, Jan 22, 2009 at 8:16 PM, Greg Snow wrote: > I believe the original thread was about whether the function returns NA or > stops with an error when given an invalid date (such as Feb 29 in a non-leap > year).

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

2009-01-22 Thread Rolf Turner
On 23/01/2009, at 12:49 AM, Neil Shephard wrote: aiminy wrote: de Jong, S. (1993) SIMPLS: an alternative approach to partial least squares regression. Chemometrics and Intelligent Laboratory Systems, 18, 251–263 Yes, the publishers do, you can purchase it from http://dx.doi.org/10.1

Re: [R] looping over a string

2009-01-22 Thread Greg Snow
I don't see right off why the one works and the other doesn't, but this looks like one of those cases that would be better done using a list rather than global variables. Instead of assigning the variables in the global workspace, create a list and assign them there. Then you can use lapply in

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

2009-01-22 Thread Duncan Murdoch
On 1/22/2009 2:41 PM, Yi Zhang wrote: Hi, I want to create an alias for the "<-" function and then later overwrite it. Any idea how I can get the "<-" function object? I know for other functions it's easy, something like "f <- seq" will do; how really no clue for this one. Thanks! get("<-") wi

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

2009-01-22 Thread Henrique Dallazuanna
Is there many functions: See: grep("<-", ls("package:base"), value = TRUE) For 'substring<-': type `substring<-` in R On Thu, Jan 22, 2009 at 5:41 PM, Yi Zhang wrote: > Hi, > > I want to create an alias for the "<-" function and then later > overwrite it. Any idea how I can get the "<-" fu

[R] how to get a primitive function object

2009-01-22 Thread Yi Zhang
Hi, I want to create an alias for the "<-" function and then later overwrite it. Any idea how I can get the "<-" function object? I know for other functions it's easy, something like "f <- seq" will do; how really no clue for this one. Thanks! __ R-help

[R] (no subject)

2009-01-22 Thread Vikas Rawal
> ggplot2 should make legends automatically if the data is in the > correct format. If you could send a reproducible example, that would > help detect the error. Take the following two plots. The first one produces a broken line. In the second one, the variable Phase is numeric and therefore it

[R] looping over a string

2009-01-22 Thread Thomas Schwander
Hi list, I'm using R 2.8.1 under Windows vista. I have the following problem: First of all I create a string-vector. Then I "convert" these strings into variables and assign a vector of numeric values. So far everything's fine. Now I want to do nearly the same again: I create another string-ve

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

2009-01-22 Thread Greg Snow
I believe the original thread was about whether the function returns NA or stops with an error when given an invalid date (such as Feb 29 in a non-leap year). Your question was about how as.Date returned something different from what you expected. Related, but different enough that it probably

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

2009-01-22 Thread Gabor Grothendieck
The first number is the year, the second is the month and the third is the day. It ignores trailing characters. > library(chron) > f <- function(x) str(month.day.year(as.Date(x))) > f("2001/1/1") List of 3 $ month: num 1 $ day : num 1 $ year : num 2001 > f("1/1/2001") List of 3 $ month: num

Re: [R] Converting ddf/dct/sas data definition file to R

2009-01-22 Thread Stephan Kolassa
Hi Stephan, Does the foreign package help? HTH, (another) Stephan Stephan Lindner schrieb: Dear all, I was wondering whether anyone knows about a program which converts (part of) a data definition file (such as a .dct file for stata, or .sas file for sas) into an R-script. Here is an exampl

Re: [R] Loess fitting with bisquare

2009-01-22 Thread Bert Gunter
If you you use robust fitting (family = "symmetric"), there are (at least) two sets of weights used (and documented in the Help file): tricube weights are used to weight the points by their distances from the current point being estimated; bisquare weights are used in the robust fit to weight by sc

Re: [R] Converting ddf/dct/sas data definition file to R

2009-01-22 Thread Frank E Harrell Jr
The sas.get function in the Hmisc package, or the sasxport.get function, will do what you want by a different approach. Frank Stephan Lindner wrote: Dear all, I was wondering whether anyone knows about a program which converts (part of) a data definition file (such as a .dct file for stata, o

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

2009-01-22 Thread Marie Sivertsen
Dear Brian, I dont understand what you mean. The thread was about the as.Date which you suggested to be used instead of the as.date. Following your advice I tried the as.Date and have questions about the observed behaviour, which was surprising to me. Is this what you call hijacking? Do you me

[R] Converting ddf/dct/sas data definition file to R

2009-01-22 Thread Stephan Lindner
Dear all, I was wondering whether anyone knows about a program which converts (part of) a data definition file (such as a .dct file for stata, or .sas file for sas) into an R-script. Here is an example with a .sas file: <-- snipp VALUE HTYPE (default=32) 0 = "Not in house

Re: [R] infer haplotypes phasing trios tdthap

2009-01-22 Thread Jing Hua Zhao
Dear Tiago, I received this message from r-help. I should say I have limited experiences with tdthap so David should have the final say about it? Alternatively, you may wish to use independent programs as listed in the linkage server at Rockefeller? I would of course find out if I have miscopie

Re: [R] dimnames in pkg "ipred"

2009-01-22 Thread Uwe Ligges
Häring, Tim (LWF) wrote: Hello List, I`m trying to make prediction using a bagged tree with the package ipred. I tried to follow the manual but I`m getting an error message. Also browsing through the list-archive I didn`t find any hint. Maybe someone can help me? selbag <- bagging(S

Re: [R] title: words in different colors?

2009-01-22 Thread Barry Rowlingson
Here's my version of the technicolor title function: multiTitle <- function(...){ ### ### multi-coloured title ### ### examples: ### multiTitle(color="red","Traffic", ### color="orange"," light ", ### color="green","signal") ### ### - note triple backslashes needed for emb

Re: [R] Loess fitting with bisquare

2009-01-22 Thread Christian Ritz
Hi, doing a search in R gives help.search("loess") ?loess Look out for the "family" argument in the help page. Christian __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] Loess fitting with bisquare

2009-01-22 Thread Greg Snow
The loess function in R uses the tricube weights that are described in my copy of Cleveland, so that may do what you want. If you really want to do the same general idea but with a different weight function, then it is not that hard to write your own function to do the estimating (but I doubt t

[R] maintaining variable types in data frames

2009-01-22 Thread Mike Miller
Suppose X and Y are two data frames with the same structures, variable names and dimensions but with different data and different patterns of missing. I want to replace missing values in Y with corresponding values from X. I'll construct a simple two-by-two case: X <- as.data.frame(matrix(c

Re: [R] quantile question

2009-01-22 Thread ANJAN PURKAYASTHA
Thanks all for your prompt and helpful replies! Anjan On Thu, Jan 22, 2009 at 11:52 AM, ANJAN PURKAYASTHA < anjan.purkayas...@gmail.com> wrote: > Hi, > A simple quantile question: > I need to calculate the 95% and 5% quantiles (aka percentiles) for the > following data: > 67.12 > 64.51 > 62.06 >

[R] write.fasta (seqinr package)

2009-01-22 Thread joseph
Hi I would like to use 'write.fasta(sequences, names, nbchar = 60, file.out, open = "w")' to convert a DNA sequence in a text file to fasta format. How do I read the the text file to prepare the argument 'sequences' of the function. The DNA sequence in the text file is one line as below: ATCACACA

[R] Loess fitting with bisquare

2009-01-22 Thread Marcin Kozak
Hi, It seems there is no straightforward way to carry out in R the loess fitting with bisquare, as given by William Cleveland in his "Visualizing Data". Am I right? Thanks in advance, Marcin -- "Build up your weaknesses until they become your strong points" -- Knute Rockne _

Re: [R] quantile question

2009-01-22 Thread Dimitris Rizopoulos
have a look at the online help file of ?quantile(); check also: x <- c(67.12, 64.51, 62.06, 55.45, 51.41, 43.78, 10.74, 10.14) sapply(1:9, function (i) quantile(x, c(0.05, 0.95), type = i)) I hope it helps. Best, Dimitris ANJAN PURKAYASTHA wrote: Hi, A simple quantile question: I need to ca

Re: [R] quantile question

2009-01-22 Thread Greg Snow
Read the help page for the quantile function (the whole page, there is a lot of good detail in there), the 2nd reference on the page should also be a helpful read. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Origin

Re: [R] blowup portion of graph beside it

2009-01-22 Thread Greg Snow
Here is one way: tmpmat <- cbind( c(1,1), c(1,1), c(2,3) ) layout(tmpmat) with(iris, plot(Sepal.Width, Sepal.Length, col=c('red','green','blue')[Species])) with(iris, plot(Sepal.Width, Sepal.Length, col=c('red','green','blue')[Species], xlim=c(2.5,3), ylim=c(6,6.5))) with

[R] ggplot2

2009-01-22 Thread Vikas Rawal
I have been struggling to get the legends in ggplot2 right or do away with them altogether (on which I have already sent a post). In the following code, the labels argument in the scale_colour_gradient2 does not give me the desired labels in the legend. Could someone explain? qplot(Year,CDR,da

Re: [R] robust regression

2009-01-22 Thread David Winsemius
On Jan 22, 2009, at 11:06 AM, Georg Ehret wrote: Dear Miss R, I have a large dataset that is skewed and would like to calculate confidence intervals for my regression line. Unfortunately I have trouble finding commands for rubust regression and in particular for the confidence intervals

[R] quantile question

2009-01-22 Thread ANJAN PURKAYASTHA
Hi, A simple quantile question: I need to calculate the 95% and 5% quantiles (aka percentiles) for the following data: 67.12 64.51 62.06 55.45 51.41 43.78 10.74 10.14 if I use the formula: 95% quantile point= 95 (8+1)/100, I get the 8.55th point as the 95% quantile. Which does not make too much se

[R] blowup portion of graph beside it

2009-01-22 Thread rajesh j
Hi, I'd like to blow up portions of my graph and put it in boxes beside the graph.Is there an addon to do this? -- Rajesh.J [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Confused about behavior of an S4 object containing a ts object

2009-01-22 Thread Lyman, Mark
I posted the question below about a month ago but received no response. I still have not been able to figure out what is happening. I also noticed another oddity. When the data part of the object is a multivariate time series, it doesn't show up in the structure, but it can be treated as a multiva

Re: [R] Simple package question

2009-01-22 Thread Uwe Ligges
Terry Therneau wrote: With respect to scripts in the "tests" directory of a package: Can they depend on data sets found in the 'data' directory of said package? -available by default - need to use a data() call - need to explicitly attach? Terry, you need to load

[R] ggplot2, pretty=FALSE

2009-01-22 Thread Vikas Rawal
The following code used to work on an earlier version of ggplot2. But it gives me an error now. qplot(Year,CDR,data=b3,colour=Phase,geom=c("point","line"))->p p+scale_colour_gradient2(limits=c(1,3), midpoint=2,low="magenta", mid="darkgreen", high="blue")->p (print(p,pretty=F)->p) print(p,pretty=

Re: [R] Package installation failed

2009-01-22 Thread Uwe Ligges
Odette Gaston wrote: Hi folks, I am currently having the problem with using R 2.8.1 that I cannot install some of packages from CRAN or local drive and somebody may be able to help me. ex) faraway package and lme4 package. I have downloaded them in my hard drive as local, but still R was unabl

Re: [R] help using zeroinfl()

2009-01-22 Thread Achim Zeileis
On Thu, 22 Jan 2009, Simon Pickett wrote: Hi all, I have been trying to use zeroinfl() with the pscl package with R version 2.1.1. That version is ancient, please upgrade. and with the newest versions of the contrib packages compatible with R 2.1.1. A version number for pscl would have b

[R] Simple package question

2009-01-22 Thread Terry Therneau
With respect to scripts in the "tests" directory of a package: Can they depend on data sets found in the 'data' directory of said package? -available by default - need to use a data() call - need to explicitly attach? This isn't clear to me from reading the documentatio

Re: [R] Frequency and summary statistics table with different variables and categories

2009-01-22 Thread David Winsemius
You should look at how summary.data.frame does it. (You are, of course, re-inventing the wheel.) You probably ought to also look at the doBy package with its summaryBy function. The help page example uses the length function for counts. I often prefer the output of describe() in Hmisc. --

[R] convergence problem gamm / lme

2009-01-22 Thread geert aarts
Hope one of you could help with the following question/problem: We would like to explain the spatial distribution of juvenile fish. We have 2135 records, from 75 vessels (code_tripnr) and 7 to 39 observations for each vessel, hence the random effect for code_tripnr. The offset (‘offsetter’) ac

[R] robust regression

2009-01-22 Thread Georg Ehret
Dear Miss R, I have a large dataset that is skewed and would like to calculate confidence intervals for my regression line. Unfortunately I have trouble finding commands for rubust regression and in particular for the confidence intervals... Can you possibly give a hint? Thank you and best rega

[R] Package installation failed

2009-01-22 Thread Odette Gaston
Hi folks, I am currently having the problem with using R 2.8.1 that I cannot install some of packages from CRAN or local drive and somebody may be able to help me. ex) faraway package and lme4 package. I have downloaded them in my hard drive as local, but still R was unable to find the package (me

[R] help using zeroinfl()

2009-01-22 Thread Simon Pickett
Hi all, I have been trying to use zeroinfl() with the pscl package with R version 2.1.1. and with the newest versions of the contrib packages compatible with R 2.1.1. I have read the examples, the vignette and all the posts relating to zeroinfl() but I am still confused as to how to structure

Re: [R] trouble converting an array to a dataframe

2009-01-22 Thread hadley wickham
On Thu, Jan 22, 2009 at 9:09 AM, Christopher W. Ryan wrote: > I probably did not explain my data clearly. I am starting with a > dataframe with three columns: > > redlognumb radiologistbarrtotal > > where the entries in the variable radiologist are either 1 or 2, > indicating which radiolo

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

2009-01-22 Thread Sylvain Barthelemy
Dear Michael, David Ruelle wrote a very interesting paper on "Recurrence plots of dynamical Systems" that you should read, and I remember of simples lead/lags methods to detect random or determinist systems. I think that you should take a look at this very interesting paper on "Lead-lag cross-sec

Re: [R] Finding the distance between ordered integers

2009-01-22 Thread Jorge Ivan Velez
Dear Dale, Try this: set.seed(555) x <- sample(1:365, 10, replace=TRUE) x <- sort(x) diff(x) HTH, Jorge On Thu, Jan 22, 2009 at 10:07 AM, Dale Steele wrote: > I'm stuck on how best to of find the distance between ordered integers > (presented below as a birthday problem). Given the vector x,

Re: [R] trouble converting an array to a dataframe

2009-01-22 Thread Christopher W. Ryan
I probably did not explain my data clearly. I am starting with a dataframe with three columns: redlognumb radiologistbarrtotal where the entries in the variable radiologist are either 1 or 2, indicating which radiologist generated that barrtotal. All subjects had their X-ray read independ

Re: [R] text vector clustering

2009-01-22 Thread David Winsemius
Simply doing a tabulation and isolating the cases with only one entry might have been a possibility if the count discrepancy weren't so high. It appears you have a greater degree of corruption than would be expected just from "typos". Have you looked at the packages referenced at: http:

[R] Finding the distance between ordered integers

2009-01-22 Thread Dale Steele
I'm stuck on how best to of find the distance between ordered integers (presented below as a birthday problem). Given the vector x, how do I most efficiently generate the vector x[i+1] - x[i]? Thanks. --Dale For example... set.seed(555) x <- sample(1:365, 10, replace=TRUE) x <- sort(x) x

Re: [R] Error as.Date on Invalid Dates

2009-01-22 Thread Marie Sivertsen
I am relatively new to R, so maybe I am miss something, but I now tried the as.Date now and have problems understanding how it works (or don't work as it seem). Brian D Ripley wrote: > On Thu, 22 Jan 2009, Terry Therneau wrote: >> >> One idea is to use the as.date function, for the older (and les

  1   2   >