Re: [R] R Book Advice Needed

2007-06-14 Thread Alain Reymond
Cody, I plan to use it in life sciences. We use of course basic descriptive statistics but also classification using ACP and CAH (French abbreviation for Principal Component Analysis and Hierarchical Cluster Analysis). We also use logistic regression for classifying some results of clinical

[R] Annotating trellis graphics

2007-06-14 Thread Alan S Barnett
I'm using xyplot to generate a trellis plot with each panel containing a scatterplot and a best fit line. Is it possible to write the slope of the best fit line in each panel? -- Alan S Barnett [EMAIL PROTECTED] NIMH/CBDB __ R-help@stat.math.ethz.ch

Re: [R] Panel data

2007-06-14 Thread Stefan Grosse
Panel data is that you have e.g. several subjects (=individuals,firms,households) being tracked over a certain time (meaning there are repeated observations). One could roughly say that it is a collection of (quite similiar) time series. This makes the analysis better than pooling the whole

Re: [R] Panel data

2007-06-14 Thread Prof Brian Ripley
On Wed, 13 Jun 2007, Megh Dal wrote: Then what is the difference between panel data and time series data? You said panel data is data on same subject being tracked over time. But time series data also do the same. Please correct me if I am wrong. Panel data is about several subjects being

Re: [R] extractor rows from a matrix

2007-06-14 Thread billycorg
thanks for the answer..but i don't find what i'm looking for! now i'm trying to expose better my problem: i have: ht= a 1096rows x 3 columns matrix i'd like a function like this: d[i]=rbind(ht[i,]) for (i in 1:length(ht)) but this don't work :( can anyone seriously help me? -- View this

[R] Responding to a posting in the digest

2007-06-14 Thread Moshe Olshansky
Is there a convenient way to respond to a particular posting which is a part of the digest? I mean something that will automatically quote the original message, subject, etc. Thank you! Moshe Olshansky [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch

Re: [R] Formatted Data File Question for Clustering -Quickie Project

2007-06-14 Thread Vladimir Eremeev
The R Data Import/Export guide was mentioned already, it contains everything you should know about data exchange between R and other software. In case it says nothing about dates, try as.Date() and strftime(). For your example below, as.Date(1/31/1994,format=%m/%d/%Y) works. ngottlieb wrote:

Re: [R] Read Windows-like .INI files into R data structure?

2007-06-14 Thread Christophe Pallier
On 6/14/07, Gabor Grothendieck [EMAIL PROTECTED] wrote: Here is yet another solution. This is the simplest so far. Lines.raw is as before and the output is a 3 column character matrix. section - f - function(x) { if (length(x) == 1) section - gsub([\\[\\]], , x) if

Re: [R] Read Windows-like .INI files into R data structure?

2007-06-14 Thread Christophe Pallier
Ah! I forgot to mention that it is possible to call awk from R: a - system(awk -F'=' '/\\[/{a=$1;next}{print $1,$2,a}' example.ini, intern=T) z - textConnection(a) read.table(z) Christophe On 6/14/07, Christophe Pallier [EMAIL PROTECTED] wrote: On 6/14/07, Gabor Grothendieck [EMAIL

[R] ARIMA with more than one seasonality period

2007-06-14 Thread Paulo Tanimoto
Dear R community, I have a project with electricity load forecasting, and I got hourly data for system load. If you haven't worked with electricity before, seasonality comes in many flavors: a daily pattern, with a peak at around 7pm; a weekly pattern, in which we use more electricity on

Re: [R] extractor rows from a matrix

2007-06-14 Thread Petr Klasterecky
billycorg napsal(a): thanks for the answer..but i don't find what i'm looking for! now i'm trying to expose better my problem: i have: ht= a 1096rows x 3 columns matrix i'd like a function like this: d[i]=rbind(ht[i,]) for (i in 1:length(ht)) but this don't work :( can anyone

[R] make sample() faster

2007-06-14 Thread Rainer M. Krug
Hi I have a simulation which is relatively slow. I used Rprofile() and identified the calls to sample() as the culprit is sample(): summaryRprof(Documents/PostDoc/Aloe_Pillansii/R/create.out) $by.self self.time self.pct total.time total.pct sample 1.30

[R] Difference between prcomp and cmdscale

2007-06-14 Thread michael watson \(IAH-C\)
I'm looking for someone to explain the difference between these procedures. The function prcomp() does principal components anaylsis, and the function cmdscale() does classical multi-dimensional scaling (also called principal coordinates analysis). My confusion stems from the fact that they give

[R] How to set degrees of freedom in cor.test?

2007-06-14 Thread Florence Dufour
Hello, I want to compute a correlation test but I do not want to use the degrees of freedom that are calculated by default but I want to set a particular number of degrees of freedom. I looked in the manual, different other functions but I did not found how to do it Thanks in advance for your

Re: [R] Responding to a posting in the digest

2007-06-14 Thread Ted Harding
On 14-Jun-07 07:26:26, Moshe Olshansky wrote: Is there a convenient way to respond to a particular posting which is a part of the digest? I mean something that will automatically quote the original message, subject, etc. Thank you! Moshe Olshansky [EMAIL PROTECTED] This will depend

Re: [R] A Question about R

2007-06-14 Thread M. P. Papadatos
Hi, This might help you: https://stat.ethz.ch/pipermail/r-help/2000-February/009984.html Martin On 11 Jun 2007, at 20:50, [EMAIL PROTECTED] wrote: Hi Sir/Madam, I'm a researcher in university of Guelph, Canada and now considering using R to do some data analysis. I'm wondering whether

Re: [R] Using odesolve to produce non-negative solutions

2007-06-14 Thread Thomas Petzoldt
Dear Jeremy, a few notes about your model: The equations of your derivatives are designed in a way that can lead to negative state variables with certain parameter combinations. In order to avoid this, you are using if constructions which are intended to correct this. This method is however

Re: [R] ML, REML and several random effects

2007-06-14 Thread Gregor
Arnaud Mosnier arnaud_mosnier at UQAR.QC.CA writes: Hello everyone, Hope that my question could have interest for more than one people here. I know that in order to compare mixed models with different fixed effect I need to use ML method. But ... what about comparing models with the same

Re: [R] extractor rows from a matrix

2007-06-14 Thread Petr Klasterecky
Well, you cannot have a vector of vectors, you need a list of vectors. With mean() and sum() it worked probably because these produce a single number as their output. Also, the rbind() function won't help here, that is for merging vector into a matrix. Once again, reading R-Intro is the best

[R] installing packages

2007-06-14 Thread raymond chiruka
hie how do l install R packages .L'm using windows xp.plus is there a dipository for the packages that one can browse to find out what packages are available. thanks. - Be a PS3 game guru. [[alternative HTML version deleted]]

[R] besselK

2007-06-14 Thread ivivi mwaniki
Assistance, besselK- complex number problem Im a student intrested in using R in my learning and research work in option pricing however i have a problem with besselK function In R. Would you assit me in computing the besselK of third kind of a complex number in R. Any code or suggestion

[R] Research assistant in biostatistics in Copenhagen

2007-06-14 Thread Christian Ritz
The Statistics Group at the Department of Natural Sciences, Faculty of Life Sciences, University of Copenhagen, is looking for a research assistant with R skills. For details see: http://www.matfys.kvl.dk/~torbenm/eu Please note that the deadline for applications is June 22 2007. Christian

Re: [R] pretty report

2007-06-14 Thread Gavin Kelly
At 5:01 PM -0400 6/12/07, Weiwei Shi wrote: Dear Listers: I have a couple of data frames to report and each corresponds to different condtions, e.g. conditions=c(10, 15, 20, 25). In this examples, four data frames need to be exported in a pretty report. I knew Perl has some module for exporting

Re: [R] installing packages

2007-06-14 Thread John Kane
Menu Packages Install Packages works well for me. --- raymond chiruka [EMAIL PROTECTED] wrote: hie how do l install R packages .L'm using windows xp.plus is there a dipository for the packages that one can browse to find out what packages are available. thanks.

Re: [R] extractor rows from a matrix

2007-06-14 Thread John Kane
I think I understand what you want. Try htt data.frame(ht) unlist (htt) --- billycorg [EMAIL PROTECTED] wrote: thanks for the answer..but i don't find what i'm looking for! now i'm trying to expose better my problem: i have: ht= a 1096rows x 3 columns matrix i'd like a

[R] Dates in Windows

2007-06-14 Thread Tom McCallum
Hi everyone, When using R on Linux I can do the following: x - as.Date(01/04/2007, %d/%m/%Y); x [1] 2007-04-01 print(format(x, %s)); [1] 1175385600 When using R in Windows XP though the format %s does nothing but return a blank string. How can I convert a date to the number of seconds

Re: [R] Responding to a posting in the digest

2007-06-14 Thread Michael Dewey
At 08:26 14/06/2007, Moshe Olshansky wrote: Is there a convenient way to respond to a particular posting which is a part of the digest? I mean something that will automatically quote the original message, subject, etc. Yes, if you use appropriate mailing software. I use Eudora, receive the

Re: [R] make sample() faster

2007-06-14 Thread Prof Brian Ripley
I think the problem is not sample (which is written in C), but that you are calling it with size=1. Taking one sample with probabilities from a large discrete distribution is necessarily slow, but you can take a large sample for little more cost. On Thu, 14 Jun 2007, Rainer M. Krug wrote:

Re: [R] Dates in Windows

2007-06-14 Thread Prof Brian Ripley
%s is of course not documented on ?strftime: it is a glibc extension and marked as such on my Linux man page. But as.numeric(x) gives you the number of days, and as.numeric(as.POSIXct(x)) gives you the number of seconds, equal to 86400*as.numeric(x). [Why are you including empty commands at the

Re: [R] extractor rows from a matrix

2007-06-14 Thread billycorg
Petr, it works!!! thank you a lot!!! Vincenzo Petr Klasterecky wrote: Well, you cannot have a vector of vectors, you need a list of vectors. With mean() and sum() it worked probably because these produce a single number as their output. Also, the rbind() function won't help here, that

Re: [R] besselK

2007-06-14 Thread Robin Hankin
Hello AFAIK, R has no capability for evaluating Bessel functions for complex arguments. Bessel functions for complex arguments are difficult to evaluate numerically. Some Bessel functions require cut lines or consideration of Riemann surfaces. The GSL library (for which the gsl package is

[R] function with xyplot

2007-06-14 Thread Diego Gruber
Hi, I'm a new user trying to switch from SAS, so sorry for the beginner's question: Suppose I have a dataframe DF that contains variables X,Y,Z. I am trying to write a function like this: myplot - function(varname){xyplot(varname ~ Y, group = Z, data = DF)}. The problem is then how to enter X

[R] Wilcoxon test on data matrix

2007-06-14 Thread Booman, M
Dear everyone, I am trying to do a Wilcoxon one-sided test on my gene expression data. These are the data i have in R: data.matrix (matrix, numeric) containing all gene expression data (42 rows=genes, 42 columns=tumors), no column header or row names data.cl (vector, numeric) consisting of 42

Re: [R] Generating artificial datasets with a specific correlation coefficient.

2007-06-14 Thread James R. Milks
Thanks to all who responded to my request. I'll probably use the corgen function in ecodist, as suggested by Sarah Goslee (below), as I just need examples of correlated vectors. Thanks again. Jim Milks Graduate Student Environmental Sciences Ph.D. Program 136 Biological Sciences Wright

Re: [R] function with xyplot

2007-06-14 Thread John Kane
You need to reference the data.frame or append it. myplot(DF$X) should work or append(DF) myplot(X) --- Diego Gruber [EMAIL PROTECTED] wrote: Hi, I'm a new user trying to switch from SAS, so sorry for the beginner's question: Suppose I have a dataframe DF that contains variables X,Y,Z.

Re: [R] test if files in current folder

2007-06-14 Thread Vladimir Eremeev
runner wrote: I want to test if the files are already in my current folder before I download or copy from somewhere else. What's in my mind is to check if a file is open-able in current folder. Is there a way to do this, like in Perl: if (open()) { do sth}? To put it another way, how

Re: [R] Wilcoxon test on data matrix

2007-06-14 Thread Christophe Pallier
wilcox.test(data.matrix[i,] ~ data.cl)$p.value will return the p.value for row 'i'. With a loop: pv = rep(0,42) for (i in 1:42) { pv[i]=wilcox.test(data.matrix[i,] ~ data.cl)$p.value } Is this what you wanted? Christophe On 6/14/07, Booman, M [EMAIL PROTECTED] wrote: Dear

Re: [R] Tools For Preparing Data For Analysis

2007-06-14 Thread Ted Harding
As a tangent to this thread, there is a very relevant article in the latest issue of the RSS magazine Significance, which I have just received: Dr Fisher's Casebook The trouble with data Significance, Vol 4 (2007) Issue 2. Full current contents at

[R] building packages under windows

2007-06-14 Thread Cinzia Viroli
I tried to check or build a package under windows xp but I got the error the package can not be installed (without any details in the install.out file) I work with R-2.5.0, Miktex 2.5.0, and I have installed the unix tools.zip, Perl and Microsoft HTML Workshop. The path environment is ok.

Re: [R] Difference between prcomp and cmdscale

2007-06-14 Thread Mark Difford
Michael, Why should that confuse you? Have you tried reading some of the literature on these methods? There's plenty about them on the Net (Wiki's often a goodish place to start)---and even in R, if you're prepared to look ;). BestR, Mark. michael watson (IAH-C) wrote: I'm looking for

Re: [R] Difference between prcomp and cmdscale

2007-06-14 Thread Prof Brian Ripley
On Thu, 14 Jun 2007, michael watson (IAH-C) wrote: I'm looking for someone to explain the difference between these procedures. The function prcomp() does principal components anaylsis, and the function cmdscale() does classical multi-dimensional scaling (also called principal coordinates

Re: [R] building packages under windows

2007-06-14 Thread Prof Brian Ripley
If you try Rcmd INSTALL mypackage you will get the error messages on the terminal. I've never not seen them in the mypackage.Rcheck/00install.out file, but then I used the correct name. On Thu, 14 Jun 2007, Cinzia Viroli wrote: I tried to check or build a package under windows xp but I

Re: [R] make sample() faster

2007-06-14 Thread Rainer M. Krug
Thanks for the info - so the solution would (likely) be to draw several samples and use these whenever I need a new one. tHANKS, i'LL TRY IT OUT, rAINER P.S: somebody said once that the caps-lock key is the most useless key on the keyboard and he is right... Prof Brian Ripley wrote: I

Re: [R] test if files in current folder

2007-06-14 Thread Prof Brian Ripley
On Thu, 14 Jun 2007, Vladimir Eremeev wrote: runner wrote: I want to test if the files are already in my current folder before I download or copy from somewhere else. What's in my mind is to check if a file is open-able in current folder. Is there a way to do this, like in Perl: if

[R] Preserving dates in Excel.

2007-06-14 Thread Patnaik, Tirthankar
Hi, Quick question: Say I have a date variable in a data frame or matrix, and I'd like to preserve the date format when using write.table. However, when I export the data, I get the generic number underlying the date, not the date per se, and a number such as 11323, 11324, etc are not

Re: [R] Fitted Value Pareto Distribution

2007-06-14 Thread livia
Thank you very much and that is exactly what I am looking for. Another question would be how can I test the goodness of fit for the Pareto distribution? J. Hosking wrote: livia wrote: I would like to fit a Pareto Distribution and I am using the following codes. I thought the fitted

[R] problem with hist()

2007-06-14 Thread Mario Dejung
Hey everybody, I try to make a graph with two different plots. First I make a boxplot of my data. It is a collection off correlation values of different pictures. For example: 0.23445 pica 0.34456 pica 0.45663 pica 0.98822 picb 0.12223 picc 0.34443 picc etc. Ok, I make this boxplot and I get

Re: [R] Preserving dates in Excel.

2007-06-14 Thread Peter Dalgaard
Patnaik, Tirthankar wrote: Hi, Quick question: Say I have a date variable in a data frame or matrix, and I'd like to preserve the date format when using write.table. However, when I export the data, I get the generic number underlying the date, not the date per se, and a number such as

Re: [R] function with xyplot

2007-06-14 Thread Diego Gruber
Thanks a lot for your suggestions. Referencing the dataset solved the problem. I had actually tried it before but since I was also subsetting the datset within the function (something I didn't mention in my question) the objects were not of the same length and that caused me trouble. Your comment

Re: [R] Preserving dates in Excel.

2007-06-14 Thread Prof Brian Ripley
On Thu, 14 Jun 2007, Patnaik, Tirthankar wrote: Hi, Quick question: Say I have a date variable in a data frame or matrix, Which? It matters: see the help page. and I'd like to preserve the date format when using write.table. However, when I export the data, I get the generic number

Re: [R] Difference between prcomp and cmdscale

2007-06-14 Thread michael watson \(IAH-C\)
Hi Mark I think Brian Ripley answered this most effectively and succinctly. I did actually do quite a bit of googling and searching of the R help before posting, and whilst there is quite a lot on each topic individually, I failed to find articles that compare and contrast PCA and MDS. If you

[R] scatterplots: (equal axes and overlay)

2007-06-14 Thread Matthias von Rad
Hi, I am doing lots of scatterplots for my dissertation and to make the comparable, I would like to have equal x- amd - y axis. Can I specify their scale? Another question adresses overlay scatterplots. Having prae and post measures for each case, is it possible to have them in one graph with

Re: [R] building packages under windows

2007-06-14 Thread Cinzia Viroli
Thank you for your suggestion. I tried WITH different packages and also I tried to INSTALL the package OC from CRAN and I got the message installing to 'c:PROGRA~1/r/R-25~1.0/library' *** Installation of oc failed *** Removing 'c:/PROGRA~1/r/R-25~1.0/library/oc' my path for R is 'c:/program

Re: [R] Preserving dates in Excel.

2007-06-14 Thread Patnaik, Tirthankar
Hi Peter, Prof. Ripley, You're right--I just realized I was exporting a matrix, after converting the data-frame using data.matrix, where the date characteristics are lost. Basically a function I was running converted the dataframe to a matrix first--something I'd forgotten. z1 -

[R] nlsList problems: control option does not effect output and strange environment search

2007-06-14 Thread Theis, Winfried
Dear R-helpers, I'm using R 2.5.0 under Windows and am trying to use nlsList from nlme 3.1-80 with the selfstart function for the four parametric logistic function. My first test went well, but now I'm trying to do some more sophisticated things and it does not work anymore. I simulate my

Re: [R] Difference between prcomp and cmdscale

2007-06-14 Thread Sarah Goslee
On 6/14/07, michael watson (IAH-C) [EMAIL PROTECTED] wrote: ... I failed to find articles that compare and contrast PCA and MDS. If you know of any, of course I would be happy to read them. There's an excellent non-R discussion of a wide range of ordination methods at

[R] Using subset() in a user-defined function

2007-06-14 Thread Tobin, Jared
Hello, I'm having a problem with using subset() inside a function I'm writing. Ignoring everything else in the function, the problem can be illustrated by (where master.frame is the data frame I'm using): function1 - function(arg1=, arg2=, arg3=){ temp.frame - subset(master.frame, a ==

Re: [R] Difference between prcomp and cmdscale

2007-06-14 Thread Mark Difford
Hi Michael, Doubtless Professor Ripley did; but it helps to put your back into it. Long ago Gower (1966) drew attention to the links between PCA and classical scaling. It took me a few seconds to find this: http://www.garfield.library.upenn.edu/classics1980/A1980JJ0821.pdf Of course, I

[R] Confidence interval for coefficient of variation

2007-06-14 Thread Kevin Wright
This is a function I coded a few years ago to calculate a confidence interval for a coefficient of variation. The code is based on a paper by Mark Vangel in The American Statistician. I have not used the function much, but it could be useful for comparing cv's from different groups. Kevin

Re: [R] besselK

2007-06-14 Thread Ben Bolker
Robin Hankin r.hankin at noc.soton.ac.uk writes: Hello AFAIK, R has no capability for evaluating Bessel functions for complex arguments. Bessel functions for complex arguments are difficult to evaluate numerically. Some Bessel functions require cut lines or consideration of

Re: [R] Using subset() in a user-defined function

2007-06-14 Thread Duncan Murdoch
On 6/14/2007 9:38 AM, Tobin, Jared wrote: Hello, I'm having a problem with using subset() inside a function I'm writing. Ignoring everything else in the function, the problem can be illustrated by (where master.frame is the data frame I'm using): function1 - function(arg1=, arg2=,

Re: [R] problem with hist()

2007-06-14 Thread Uwe Ligges
Mario Dejung wrote: Hey everybody, I try to make a graph with two different plots. First I make a boxplot of my data. It is a collection off correlation values of different pictures. For example: 0.23445 pica 0.34456 pica 0.45663 pica 0.98822 picb 0.12223 picc 0.34443 picc etc.

Re: [R] scatterplots: (equal axes and overlay)

2007-06-14 Thread Roland Rau
Hi Matthias, please see below for some code example. Matthias von Rad wrote: Hi, I am doing lots of scatterplots for my dissertation and to make the comparable, I would like to have equal x- amd - y axis. Can I specify their scale? Another question adresses overlay scatterplots. Having prae

[R] names() after library(RDCOMClient) problem(?)

2007-06-14 Thread Vorlow Constantinos
Hello, Try example(names) in R 2.5.0 after library(RDCOMClient) and you get example(names) names # print the names attribute of the islands data set names names(islands) Error in names(islands) : no applicable method for names Is this normal? Any way round it??? Best

[R] system(R CMD BATCH ...) on UNIX-alikes

2007-06-14 Thread Meinhard Ploner
If I start from R (in emacs) a new R batch job using system(R CMD BATCH --no-save --quiet Rin.txt Rout.txt, intern=FALSE, ignore.stderr=TRUE, wait=FALSE, input=NULL) the job runs fine and smooth. However, when, for any reason, I press later ctrl+C in the calling R, it not

[R] Problems with na.rm=T

2007-06-14 Thread Lucke, Joseph F
Suddenly (e.g. yesterday) all my functions that have na.rm= as a parameter (e.g., mean(), sd(), range(), etc.) have been reporting warnings with na.rm=T. The message is Warning message: the condition has length 1 and only the first element will be used in: if (na.rm) x - x[!is.na(x)] . This has

Re: [R] Using subset() in a user-defined function

2007-06-14 Thread Tobin, Jared
Thanks for the quick response, Duncan. The given code doesn't seem to work, and possibly due to this reason I found in the online help for missing() (if I understand it correctly): Currently missing() can only be used in the immediate body of the function that defines the argument, not in the

Re: [R] Problems with na.rm=T

2007-06-14 Thread Duncan Murdoch
On 6/14/2007 10:32 AM, Lucke, Joseph F wrote: Suddenly (e.g. yesterday) all my functions that have na.rm= as a parameter (e.g., mean(), sd(), range(), etc.) have been reporting warnings with na.rm=T. The message is Warning message: the condition has length 1 and only the first element will be

[R] R programming question

2007-06-14 Thread Nelson, Gary (FWE)
Dear All., I've created R-code for which a user will be asked to choose between 2 analyses. I've written one function for each type of analysis. Within each function, the users is prompted to enter information. An example is: cat(Enter value for lower Linf :\n) L1-scan(n=1)

Re: [R] Problems with na.rm=T

2007-06-14 Thread Peter Dalgaard
Lucke, Joseph F wrote: Suddenly (e.g. yesterday) all my functions that have na.rm= as a parameter (e.g., mean(), sd(), range(), etc.) have been reporting warnings with na.rm=T. The message is Warning message: the condition has length 1 and only the first element will be used in: if (na.rm) x

[R] simulate null hypothesis

2007-06-14 Thread Weiwei Shi
Hi, there: This is a bit off-topic but I try to do it in R so I put it here: I have 31 samples from a population of genes, and each sample contains a pair of gene lists, with different lengths and the intersection between the two lists also varies. I want to test my hypothesis by creating a null

Re: [R] ARIMA with more than one seasonality period

2007-06-14 Thread sj
Paulo, I have run into similar problems when wanting to work with multiple seasonality. You are probably already familiar with the work by James Taylor in this area. I contacted him and he was kind enough to share some of his (Gauss) code, and I have tried to implement it in R, but due to my lack

Re: [R] Problems with na.rm=T

2007-06-14 Thread Lucke, Joseph F
Brilliant! Yesterday, I created a table called T. Dumb. Removing it solves the problem. Thanks. -Original Message- From: Duncan Murdoch [mailto:[EMAIL PROTECTED] Sent: Thursday, June 14, 2007 10:01 AM To: Lucke, Joseph F Cc: r-help@stat.math.ethz.ch Subject: Re: [R] Problems with

Re: [R] [OT]Web-Based Data Brushing

2007-06-14 Thread Greg Snow
There is the TkBrush function in the TeachingDemos package for R. It is not web based. -Original Message- From: Roy Mendelssohn [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch r-help@stat.math.ethz.ch Sent: 6/12/07 10:26 AM Subject: [R] [OT]Web-Based Data Brushing I apologize for the

Re: [R] Problems with na.rm=T

2007-06-14 Thread Barry Rowlingson
Lucke, Joseph F wrote: Suddenly (e.g. yesterday) all my functions that have na.rm= as a parameter (e.g., mean(), sd(), range(), etc.) have been reporting warnings with na.rm=T. The message is Warning message: the condition has length 1 and only the first element will be used in: if (na.rm) x

Re: [R] Using subset() in a user-defined function

2007-06-14 Thread Tobin, Jared
I should mention the idea I worked on yesterday was cat()ing together the appropriate condition strings and then ideally printing that entire concatenated string into the subset argument. However, as far as I know, cat() only prints directly on the console and cannot be used to substitute input

Re: [R] Using subset() in a user-defined function

2007-06-14 Thread Duncan Murdoch
On 6/14/2007 10:57 AM, Tobin, Jared wrote: Thanks for the quick response, Duncan. The given code doesn't seem to work, and possibly due to this reason I found in the online help for missing() (if I understand it correctly): Currently missing() can only be used in the immediate body of the

[R] Goodness of fit- Pareto distribution

2007-06-14 Thread livia
Hello, I have fitted a Pareto Distribution for some data, I would appreciate if anyone can tell me how to evaluate the goodness of fit for the distribution. What I do now is rather subjective. I just compare the emprcical density distribution and the fitted density distribution. -- View this

Re: [R] ievent.wait

2007-06-14 Thread Greg Snow
I don't know iPlot well enough to tell about that. I was not sure if you needed to use iPlot, or just wanted to connect the points and thought that iPlot might be an answer. I suggested locator with type='l' as a possibility if traditional graphics would work for you. If you have other reasons

Re: [R] R vs. Splus in Pharma/Devices Industry

2007-06-14 Thread Greg Snow
But sweave is expanding. There is a driver for HTML sweaving in the R2HTML package and the odfWeave package allows you to sweave with open office docs (which can be converted to/from MS word). I personally like using LaTeX and the original sweave, but I work with people who want everything in MS

[R] connecting to DB2 database

2007-06-14 Thread Aydemir, Zava \(FID\)
Hi, i am trying to connect to a DB2 server using the DBI library. getData - function() { driver - dbDriver(DB2) conn - dbConnect(driver,server,uname,pword) data - dbSendquery(conn, select etc.) } When I run the function, i get the error data - getData() Error in

Re: [R] names() after library(RDCOMClient) problem(?)

2007-06-14 Thread Duncan Temple Lang
Hi Costas. On my Windows setup, I don't get this error message. What version of RDCOMClient are you using - i.e. the output of packageDescription(RDCOMClient) and also what else is loaded into the R session, i.e. sessionInfo() D. Vorlow Constantinos wrote: Hello, Try

Re: [R] R programming question

2007-06-14 Thread Charles C. Berry
Gary, You are asked to PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. when posting. You have not provided such code, and until you do I doubt we can help. When I wrap your lines

Re: [R] Confusion with sapply

2007-06-14 Thread Patnaik, Tirthankar
Thanks Gabor, this is cool! Best, -Tir -Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 13, 2007 6:53 PM To: Patnaik, Tirthankar [GWM-CIR] Cc: r-help@stat.math.ethz.ch Subject: Re: [R] Confusion with sapply Try this. It takes a Date

Re: [R] connecting to DB2 database

2007-06-14 Thread Prof Brian Ripley
On Thu, 14 Jun 2007, Aydemir, Zava (FID) wrote: i am trying to connect to a DB2 server using the DBI library. The DBI *package* does not allow you to connect to anything by itself. For that you need a driver package, currently available for MySQL, ORACLE and SQLite (only, AFAIK). There are

[R] clustalW

2007-06-14 Thread jeremy . mazet
Hello, I try to make directly with R a multiple alignment querying CLUSTAL W, do you know how can I do this? Thanks Jérémy Mazet [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list

[R] besselK- complex number problem any help is welcome

2007-06-14 Thread ivivi mwaniki
Assistance, Im a student intrested in using R in my learning and research work in option pricing however i have a problem with besselK function In R. Would you assit me in computing the besselK of third kind of a complex number in R. Any code or suggestion will be highly appriceiated eg

[R] JGR, Java and Kubuntu 7.04 ...

2007-06-14 Thread John Logsdon
R-ists Yet again Java rears its ugly head. I have Kubuntu 7.04 running the Kubuntu-repository version of R 2.4.1-1. Yes it isn't the very latest version but this is not the issue here. I want a Windows-like environment and everyone is talking about JGR. I downloaded it and installed

Re: [R] Normal and Poisson tail area expectations in R

2007-06-14 Thread Charles C. Berry
Ravi, This looks simple to me. km_G - function(lambda,k) lambda*ppois(k-1,lambda,lower=FALSE) - k*ppois(k,lambda,lower=FALSE) Am I confused here? Chuck On Wed, 13 Jun 2007, Ravi Varadhan wrote: More interesting is the Poisson convolution. I don't know if there

[R] random effects in logistic regression (lmer)-- identification question

2007-06-14 Thread Paul Johnson
Hello R users! I've been experimenting with lmer to estimate a mixed model with a dichotomous dependent variable. The goal is to fit a hierarchical model in which we compare the effect of individual and city-level variables. I've run up against a conceptual problem that I expect one of you can

Re: [R] Normal and Poisson tail area expectations in R

2007-06-14 Thread Ravi Varadhan
Perfect, Chuck. I got a closed-form solution after some algebraic labor, but your solution is simple and elegant. Ravi. --- Ravi Varadhan, Ph.D. Assistant Professor, The Center on Aging and Health Division of

[R] how to fit y=m*x

2007-06-14 Thread genomenet
Hi There, I have a set of data (xi,yi).I want to fit them with the equation y=mx. note: in the above equation, there is no intercept. I don't know how to use common software such as R , matlab, sas, or spss to do this kind of regression. Does anyone know how to do this? I know it is easy to

Re: [R] how to fit y=m*x

2007-06-14 Thread Ndoye Souleymane
Hi, try : ln(y~x) From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Subject: [R] how to fit y=m*x Date: Thu, 14 Jun 2007 11:25:54 -0700 Hi There, I have a set of data (xi,yi).I want to fit them with the equation y=mx. note: in the above equation, there is no

Re: [R] how to fit y=m*x

2007-06-14 Thread Andrew Robinson
Probably lm(y ~ x - 1) will be better. y~x doesn't remove the intercept, and ln() is a typo (I hope!) Andrew On Thu, Jun 14, 2007 at 06:33:02PM +, Ndoye Souleymane wrote: Hi, try : ln(y~x) From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch

Re: [R] Annotating trellis graphics

2007-06-14 Thread Deepayan Sarkar
On 6/13/07, Alan S Barnett [EMAIL PROTECTED] wrote: I'm using xyplot to generate a trellis plot with each panel containing a scatterplot and a best fit line. Is it possible to write the slope of the best fit line in each panel? Sure. The only question is, where (inside the panel) do you want

Re: [R] how to fit y=m*x

2007-06-14 Thread Christophe Pallier
summary(lm(y ~ x - 1)) Use google (R linear regression without intercept) Read the posting guide. There. On 6/14/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi There, I have a set of data (xi,yi).I want to fit them with the equation y=mx. note: in the above equation, there is no

Re: [R] Normal and Poisson tail area expectations in R

2007-06-14 Thread Ravi Varadhan
Inspired by Chuck's elegant solution to the Poisson tail area problem, here is a simple solution to the normal tail area expectation that does not use integrate(). Gu.k - function(k) {1/sqrt(2*pi) * exp(-k*k/2) - k * pnorm(k, lower=FALSE)} k - 1:10 Gu.k(k) [1] 8.331547e-02 8.490703e-03

[R] question about formula for lm

2007-06-14 Thread Pedro Mardones
Dear all; Is there any way to make this to work?: .x-rnorm(50,10,3) .y-.x+rnorm(50,0,1) X-data.frame(.x,.y) colnames(X)-c(Xvar,Yvar) Ytext-Yvar lm(Ytext~Xvar,data=X) # doesn't run lm(Yvar~Xvar,data=X) # does run The main idea is to use Ytext as input in a function, so you just type Yvar and

[R] Course: 2-day Short R/S-Plus at JSM - Salt Lake City July - August 2007

2007-06-14 Thread elvis Miller
Greetings! XLSolutions Will schedule a series of 2-day R/S-plus courses during JSM in Salt Lake City. Please email us your interest and dates that work best for you from July 26th - August 3rd. www.xlsolutions-corp.com/courselist.htm Payment due AFTER the class Email us for group

Re: [R] question about formula for lm

2007-06-14 Thread Thomas Petzoldt
Why not using: lm(X[[Ytext]]~Xvar,data=X) ThPe Pedro Mardones wrote: Dear all; Is there any way to make this to work?: .x-rnorm(50,10,3) .y-.x+rnorm(50,0,1) X-data.frame(.x,.y) colnames(X)-c(Xvar,Yvar) Ytext-Yvar lm(Ytext~Xvar,data=X) # doesn't run lm(Yvar~Xvar,data=X) #

  1   2   >