Re: [R] Standard errors of least squares adjusted means

2009-01-22 Thread Mark Difford
Hi Bruno, Apropos of ls-means ... I have tried help.search and RSiteSearch with several terms including standard errors, least square means, adjusted means. And ls-means, which is what you call them? There are many threads on this, spanning many years. The following, RSiteSearch(ls-means)

Re: [R] Replacing dates with consecutive observations

2009-01-22 Thread Indrajit Sengupta
Hi Alina,   You can always write a loop in R to do this: # A function to shift values in an vector shift = function(y) {  cnt = length(y) - 1  m=vector(mode = numeric,length = cnt)   for (j in 1:cnt) {  m[j] = y[j+1]}  m }   Regards, Indrajit From: Alina

[R] How to Run R Programs in a Scheduled Way

2009-01-22 Thread Thorsten Muehge
Hello R Experts, does anyone know how to run R programs automatically using the window scheduler? I want to run some R programs automatically and make the results available via web. Mit freundlichen Grüßen / Best Regards / С наилучшими пожеланиями / üdvözlettel

[R] problem with compating 2 strings

2009-01-22 Thread venkata kirankumar
Hi all, I got one problem with compating charecterstrings with using == can anyone suggest if any other way to compare two charecterstrings thanks in advance [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] reshape() problems

2009-01-22 Thread Robin Hankin
Hi I have a data frame with timeseries information like this: year cell Q1Q2 Q3 Q4 1940 1 1.2 1.4 1.41.9 1941 1 2.9 2.1 3.4 2.4 1942 1 2.7 3.2 1.52.6 1940 2 1.4 2.1 2.62.4 1941 2 2.4 1.4 1.4

Re: [R] How to Run R Programs in a Scheduled Way

2009-01-22 Thread Uwe Ligges
Thorsten Muehge wrote: Hello R Experts, does anyone know how to run R programs automatically using the window scheduler? I want to run some R programs automatically and make the results available via web. Write some Windows command script (also referred to as batch file) that calls

Re: [R] problem with compating 2 strings

2009-01-22 Thread Dimitris Rizopoulos
an example would be helpful ... PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. venkata kirankumar wrote: Hi all, I got one problem with compating charecterstrings with using == can anyone

Re: [R] reshape() problems

2009-01-22 Thread ONKELINX, Thierry
Dear Robin, It is rather easy if you combine melt() and cast() from the reshape package. dataset - expand.grid(year = 1940:1942, cell = 1:2) dataset$Q1 - rnorm(nrow(dataset)) dataset$Q2 - rnorm(nrow(dataset)) dataset$Q3 - rnorm(nrow(dataset)) dataset$Q4 - rnorm(nrow(dataset)) library(reshape)

Re: [R] Replacing dates with consecutive observations

2009-01-22 Thread Henrique Dallazuanna
Try this also: x - seq(as.Date(2008-01-01), as.Date(2008-12-31), l = 10) as.Date(embed(matrix(x), 2)[,1], origin = 1970-01-01) On Wed, Jan 21, 2009 at 7:18 PM, Alina Sheyman alina...@gmail.com wrote: I am working with a list of dates and I would like to replace each date with the one that

[R] Odp: problem with compating 2 strings

2009-01-22 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 22.01.2009 10:49:26: Hi all, I got one problem with compating charecterstrings with using == can anyone suggest if any other way to compare two charecterstrings Works for me a-letters b-letters[1:10] a==b [1] TRUE TRUE TRUE TRUE TRUE

Re: [R] Sweave encoding problem

2009-01-22 Thread Gerrit Voigt
Hi Roland, thanks for your answere. I actually tried out a different, smaller Latex-header and the sweave-process suddenly worked. So I copied parts of the old header into the new one, to check what part is causing the trouble. In the end I had two documents with identical content. The new

[R] addressing and summarizing columns of a dataframe in nlme package

2009-01-22 Thread Eva Remke
Hi! Within the lm function I can address and summarize columns like that: lm1-lm(I(rowSums(spec[,5:81]))~pH) If I want to do the same in nlme package I get the following error: lme1-lme(I(rowSums(spec[,5:81]))~pH,random=~1|site) Error in model.frame.default(formula = ~spec + pH + site, data

[R] error using heatmap :evaluation nested too deeply.....

2009-01-22 Thread T Joshi
Hi, I get following error when trying to plot a heatmap on a very large matrix (808 x5000). heatmap(ctab) Error: evaluation nested too deeply: infinite recursion / options(expressions=)? Call to heatmap function is not contained within any other function or so. Upon searching the R mailing

[R] text vector clustering

2009-01-22 Thread srinivasa raghavan
Hi, I am a new user of R using R 2.8.1 in windows 2003. I have a csv file with single column which contain the 30,000 students names. There were typo errors while entering this student names. The actual list of names is 1000. However we dont have that list for keyword search. I am interested

Re: [R] Standard errors of least squares adjusted means

2009-01-22 Thread John Fox
Dear Bruno, See the effects package (on CRAN) for a generalization of adjusted means. I hope this helps, John -- John Fox, Professor Department of Sociology McMaster University Hamilton, Ontario, Canada web: socserv.mcmaster.ca/jfox -Original Message-

[R] pdf() and pch problems

2009-01-22 Thread Robin Hankin
Hi R-2.8.1, Suse 11.1 I'm having problems with pdf(). In the following transcript, file 'f.pdf' does not use the expected symbols for the plot. It uses a 'q' letter instead of the open circle I get when viewing the graphics window. I also get the same under r47678. Does anyone else get

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

2009-01-22 Thread Stefan Björk
Hello helpers, This is probably quite simple, but I'm stuck. I want to create a summary statistics table with frequencies and summary statistics for a large number of variables. The problem here is that (1) there are two different classes of categories (sex, type of substance abuse and type of

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

2009-01-22 Thread ronggui
Since %male is basically the mean if you code male=1 and female=0, which is more informative than absolute frequency. So, you may want to have a glance at doBy package, especially the summaryBy function. All the best On Thu, Jan 22, 2009 at 7:17 PM, Stefan Björk stefan.bj...@gmail.com wrote:

Re: [R] pdf() and pch problems

2009-01-22 Thread Brian D Ripley
On Thu, 22 Jan 2009, Robin Hankin wrote: Hi R-2.8.1, Suse 11.1 I'm having problems with pdf(). In the following transcript, file 'f.pdf' does not use the expected symbols for the plot. It uses a 'q' letter instead of the open circle I get when viewing the graphics window. I also get the

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

2009-01-22 Thread Neil Shephard
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.1016/0169-7439(93)85002-X Its a shame that not all

Re: [R] Sweave encoding problem

2009-01-22 Thread Duncan Murdoch
Gerrit Voigt wrote: Hi Roland, thanks for your answere. I actually tried out a different, smaller Latex-header and the sweave-process suddenly worked. So I copied parts of the old header into the new one, to check what part is causing the trouble. In the end I had two documents with

Re: [R] Opening a script with the R editor via file association (on Windows)

2009-01-22 Thread Duncan Murdoch
pdewitt wrote: I read the posting about opening .R files in windows with the Rgui and was wondering if anything has changed for R-2.8.1 and Windows Vista? I have not yet been able to get the files to open in the Rgui, the association works enough to open R but that is about it. Thanks for

Re: [R] Sweave encoding problem

2009-01-22 Thread Wacek Kusnierczyk
Duncan Murdoch wrote: I'd suggest doing a binary compare on the two files to see what the differences are. I think you are on Windows (but I may be misreading the quotes below); I recommend Beyond Compare (a shareware compare utility). It has a hex viewer plug-in that could show you a

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

2009-01-22 Thread David Winsemius
One of the various tabulation functions would seem to be the most appropriate for getting frequency summaries: ?table ?xtabs On Jan 22, 2009, at 6:17 AM, Stefan Björk wrote: Hello helpers, This is probably quite simple, but I'm stuck. I want to create a summary statistics table with

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

2009-01-22 Thread Terry Therneau
-begin included message However, as.Date encounters an error when the string does not represent an actual date. eg: date1 - 2009-02-29 # Note: 2009 not a leap year as.Date(date1) Error in fromchar(x) : character string is not in a standard unambiguous format As I have many

[R] dimnames in pkg ipred

2009-01-22 Thread Häring, Tim (LWF)
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(SOIL_UNIT ~.,

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

2009-01-22 Thread Brian D Ripley
On Thu, 22 Jan 2009, Terry Therneau wrote: -begin included message However, as.Date encounters an error when the string does not represent an actual date. eg: date1 - 2009-02-29 # Note: 2009 not a leap year as.Date(date1) Error in fromchar(x) : character string is not in a

Re: [R] pdf() and pch problems

2009-01-22 Thread T . Zumbrunn
Quoting Brian D Ripley rip...@stats.ox.ac.uk: On Thu, 22 Jan 2009, Robin Hankin wrote: Hi R-2.8.1, Suse 11.1 I'm having problems with pdf(). In the following transcript, file 'f.pdf' does not use the expected symbols for the plot. It uses a 'q' letter instead of the open circle I get when

[R] melt stumbles over deleted columns

2009-01-22 Thread Titus von der Malsburg
I have a data frame that is the result of a cast (reshape) operation. I deleted the variable column and tried to melt the resulting data frame. Depending on which method I use to delete the column I get different error messages when melting: head(tinfos) vpn group trial_no item

Re: [R] melt stumbles over deleted columns

2009-01-22 Thread hadley wickham
On Thu, Jan 22, 2009 at 8:01 AM, Titus von der Malsburg malsb...@gmail.com wrote: I have a data frame that is the result of a cast (reshape) operation. I deleted the variable column and tried to melt the resulting data frame. Depending on which method I use to delete the column I get different

Re: [R] pdf() and pch problems

2009-01-22 Thread Martin Maechler
TZ == T Zumbrunn t.zumbr...@unibas.ch on Thu, 22 Jan 2009 14:52:37 +0100 writes: TZ Quoting Brian D Ripley rip...@stats.ox.ac.uk: On Thu, 22 Jan 2009, Robin Hankin wrote: Hi R-2.8.1, Suse 11.1 I'm having problems with pdf(). In the following

[R] infer haplotypes phasing trios tdthap

2009-01-22 Thread Tiago R Magalhães
Dear R mailing list, I have a dataset with genotypes from trios and I would like to infer haplotypes for each mother, father and child. The package that I could find that can do this is tdthap. But when the mother is homozygous (e.g., 2/2) the haplotype is called as not possible to infer

Re: [R] How to Run R Programs in a Scheduled Way

2009-01-22 Thread Tony Breyal
Hi Thorsten, the way i do this (on Windows Vista Ultimate, SP1) is to create a batch file and then have windows task scheduler call it at a specific time. For example, to create my batch file i open up Notepad and type the following single line into it: C:\Program Files\R\R-2.8.1\bin\R.exe CMD

Re: [R] problem with geepack

2009-01-22 Thread wiersmap
Hi, I think in such cases you need to use the 'wave' parameter (wave = Date), but I must admit I found contradictory comments on how missing values are treated in geepack. Does someone know what geepack is doing with missing values? Popko Giacomo Santini wrote: Hi all I am analyzing a

Re: [R] U R ready for R! Now deploy your R models via cloud computing!

2009-01-22 Thread Ajay ohri
Hi Michael, Can you also build the PMML model on the cloud with R, paying for the processor ,memory usage. Any plans to extend the abilty to model, or is it just deploy PMML models on the cloud servers. Regards, Ajay http://www.decisionstats.com On Thu, Jan 22, 2009 at 4:29 AM, MZ

Re: [R] plot: abline() - define line length

2009-01-22 Thread Greg Snow
Use either the 'clip' function from the graphics package, or the 'clipplot' function from the TeachingDemos package. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From:

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 less

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

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 dale.w.ste...@gmail.comwrote: I'm stuck on how best to of find the distance between ordered integers (presented below as a birthday problem).

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

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 cr...@binghamton.edu 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

[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

[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

[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

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

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

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

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

[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=F)-p The

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

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

[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

[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

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

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

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

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

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

[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

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

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 55.45

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

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

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

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 embedding

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 -

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

[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

[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

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,

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

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

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 1 $

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

[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

[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] 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! __

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 yizhan...@gmail.com wrote: Hi, I want to create an alias for the - function and then later overwrite it. Any idea how I can get the -

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(-) will give it

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

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

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 greg.s...@imail.org 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

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] how to get a primitive function object

2009-01-22 Thread Yi Zhang
On Thu, Jan 22, 2009 at 3:06 PM, Duncan Murdoch murd...@stats.uwo.ca 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 `-`

[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] 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 copy to a

[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

[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

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 clue for this one.

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

[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

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 waclaw.marcin.kusnierc...@idi.ntnu.no 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

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

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, o...@gmx.de 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 this

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 limit the package user's freedom

[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 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 vQ I'm still not sure if

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:

  1   2   >