[R] Low level algorithm conrol in Fisher's exact test

2005-11-10 Thread Kihwang Lee
Hi folks, Forgive me if this question is a trivial issue. I was doing a series of Fishers' exact test using the fisher.test function in stats package. Since the counts I have were quite large (c(64, 3070, 2868, 4961135)), R suggested me to use *other algorithms* for the test which can be

Re: [R] Command line and R

2005-11-10 Thread paul sorenson
Angelo Secchi wrote: On Wed, 09 Nov 2005 12:25:37 - (GMT) (Ted Harding) [EMAIL PROTECTED] wrote: On 09-Nov-05 Roger Bivand wrote: On Wed, 9 Nov 2005, Angelo Secchi wrote: Hi, I wrote a small R script (delta.R) using commandArgs(). The script works from the shell in usual way R

Re: [R] help with legacy R code

2005-11-10 Thread Uwe Ligges
David Zhao wrote: Hi there, Could somebody help me disect this legacy R script I inherited at work, I have two questions: 1. I've tried to upgrade our R version from 1.6.2 (yeah, I know), to R 2.0, but some of the lines in this script are not compatible with R 2.0, could someone help me

Re: [R] Low level algorithm conrol in Fisher's exact test

2005-11-10 Thread Uwe Ligges
Kihwang Lee wrote: Hi folks, Forgive me if this question is a trivial issue. I was doing a series of Fishers' exact test using the fisher.test function in stats package. Since the counts I have were quite large (c(64, 3070, 2868, 4961135)), R suggested me to use *other algorithms* for

Re: [R] About: Error in FUN(X[[1]], ...) : symbol print-name too long

2005-11-10 Thread Uwe Ligges
gsmatos1 wrote: Hi, I´m trying to use the Win2BUGS package from R and I have a similar problem R2WinBUGS??? that reurns with the message: Error in FUN(X[[1]], ...) : symbol print-name too long But, there is no stray ` character in the file ( Sugestions given by: Duncan Temple

Re: [R] Problems with Shapiro Wilk's test of normality.

2005-11-10 Thread Fredrik Karlsson
Never mind, I solved it myself. It was an NA problem. /Fredrik On 11/9/05, Fredrik Karlsson [EMAIL PROTECTED] wrote: Hi, I am trying to create a table with information from Shapiro Wilk's test of normality. However, it fails due to lack of sample size, it says, but the way I see it, this

Re: [R] Command line and R

2005-11-10 Thread Prof Brian Ripley
On Thu, 10 Nov 2005, paul sorenson wrote: Angelo Secchi wrote: On Wed, 09 Nov 2005 12:25:37 - (GMT) (Ted Harding) [EMAIL PROTECTED] wrote: On 09-Nov-05 Roger Bivand wrote: On Wed, 9 Nov 2005, Angelo Secchi wrote: Hi, I wrote a small R script (delta.R) using commandArgs(). The

Re: [R] Low level algorithm conrol in Fisher's exact test

2005-11-10 Thread Prof Brian Ripley
On Thu, 10 Nov 2005, Kihwang Lee wrote: Hi folks, Forgive me if this question is a trivial issue. I was doing a series of Fishers' exact test using the fisher.test function in stats package. Since the counts I have were quite large (c(64, 3070, 2868, 4961135)), R suggested me to use

[R] Choosing the data type to improve accuracy in SVM, PPR and randomForest

2005-11-10 Thread jmoreira
Dear all, This question is not a pure R question but I believe it is quite related. I am trying to find some literature (without success) about the most appropriate type for the data I am using. For example: day of the week is it better represented as a factor or as a number? I am trying to

Re: [R] Low level algorithm conrol in Fisher's exact test

2005-11-10 Thread Peter Dalgaard
Uwe Ligges [EMAIL PROTECTED] writes: Kihwang Lee wrote: Hi folks, Forgive me if this question is a trivial issue. I was doing a series of Fishers' exact test using the fisher.test function in stats package. Since the counts I have were quite large (c(64, 3070, 2868, 4961135)),

Re: [R] Low level algorithm conrol in Fisher's exact test

2005-11-10 Thread Peter Dalgaard
Prof Brian Ripley [EMAIL PROTECTED] writes: AFAIK R does not have a means of doing Fisher's test on such a table, and it really does not make much statistical sense to do so. With such numbers, the null hypothesis is almost always rejected (try the chisq test), even for negligible

Re: [R] Low level algorithm conrol in Fisher's exact test

2005-11-10 Thread Jim Lemon
Prof Brian Ripley wrote: Where does it say anything about using control= ? fisher.test(x, y = NULL, workspace = 20, hybrid = FALSE, control = list(), or = 1, alternative = two.sided, conf.int = TRUE, conf.level = 0.95) ... control a list with named components

Re: [R] How to find statistics like that.

2005-11-10 Thread Duncan Murdoch
On 11/9/2005 10:01 PM, Adaikalavan Ramasamy wrote: I think an alternative is to use a p-value from F distribution. Even tough it is not a statistics, it is much easier to explain and popular than 1/F. Better yet to report the confidence intervals. Just curious about your usage: why do you say

[R] Help to multinomial analyses

2005-11-10 Thread Luciana Correia Alves
Dear Sirs, Could you please be so kind as to send us some information on residuals in multinomial logistic models? Is it possible to use R software? We thank you in advance. Sincerely yours Luciana Alves,MSc Beatriz Leimann, MD -- Luciana Correia Alves Doutoranda em Saúde Pública ENSP -

[R] silly question on covariable declaration

2005-11-10 Thread Bernat Claramunt
Hi all, sory f it is too simple I am new on using R and have not been able to find the answer of my problem in the help archives. I am performing a relatively simple aov aov( var ~ block + block/plot/treatment + season:bloc) it's a bit longer but this is how it looks like. my var is

[R] match and %in%

2005-11-10 Thread Luis Ridao Cruz
R-help, I have two data frames with a commom column (but with different size) What I want is to get a column (say df1$mycolumn ) according to the matches of common columns in both data frames. I have tried this but it is not working: transform(fb, breidd = ifelse (match

Re: [R] match and %in%

2005-11-10 Thread Sean Davis
On 11/10/05 6:33 AM, Luis Ridao Cruz [EMAIL PROTECTED] wrote: R-help, I have two data frames with a commom column (but with different size) What I want is to get a column (say df1$mycolumn ) according to the matches of common columns in both data frames. I have tried this but it is not

Re: [R] help with legacy R code

2005-11-10 Thread Prof Brian Ripley
1) There is no 'R 2.0'. What version did you mean? 2) We cannot reproduce your script (no data files), and JPEGs are not allowed on R-help: see http://www.r-project.org/mail.html. (PNGs are, though). 3) You have given us no indication of what the problems are nor in which lines. Please

Re: [R] How to find statistics like that.

2005-11-10 Thread Adaikalavan Ramasamy
If my usage is wrong please correct me. Thank you. Here are my reason : 1. p-value is a (cumulative) probability and always ranges from 0 to 1. A test statistic depending on its definition can wider range of possible values. 2. A test statistics is one that is calculated from the data without

Re: [R] How to find statistics like that.

2005-11-10 Thread Liaw, Andy
The definition of a statistic that I learned in grad school is that it's a function of a random sample from a population. Any p-value would fit that definition. Andy From: Adaikalavan Ramasamy If my usage is wrong please correct me. Thank you. Here are my reason : 1. p-value is a

Re: [R] Help to multinomial analyses

2005-11-10 Thread bady
hi, hi all, Dear Sirs, Could you please be so kind as to send us some information on residuals in multinomial logistic models? here are some references to multinomial models: Agresti A.(1996) An Introduction to Categorical Data Analysis Agresti A. (2002) Categorical Data Analysis, 2nd

Re: [R] How to find statistics like that.

2005-11-10 Thread Ruben Roa
-Original Message- From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED] On Behalf Of Adaikalavan Ramasamy Sent: Thursday, November 10, 2005 10:31 AM To: Duncan Murdoch Cc: r-help@stat.math.ethz.ch Subject: Re: [R] How to find statistics like that. If my usage is wrong please

[R] paste argument of a function as a file name

2005-11-10 Thread Luis Ridao Cruz
R-help, I have a function which is exporting the output to a file via write.table(df, file = file name.xls ) What I want is to paste the file name (above) by taking the argument to the function as a file name something like this: MY.function- function(df) { ... ...

Re: [R] Help to multinomial analyses

2005-11-10 Thread Peter Flom
Luciana Alves asked Dear Sirs, Could you please be so kind as to send us some information on residuals in multinomial logistic models? Peter L. Flom, PhD Assistant Director, Statistics and Data Analysis Core Center for Drug Use and HIV Research National Development and Research Institutes

[R] Remove levels

2005-11-10 Thread Marc Bernard
Daer All, I have a factor variable, X with 5 levels. When I type tables(X) it gives me: table(X) 1 2 34 5 10 50 0 0 How to drop the levels with zeros such that when I will type: table(X) it will give me: table(X) 1 2 10 5 Thank a lot, Bernard

Re: [R] paste argument of a function as a file name

2005-11-10 Thread Sean Davis
On 11/10/05 8:28 AM, Luis Ridao Cruz [EMAIL PROTECTED] wrote: R-help, I have a function which is exporting the output to a file via write.table(df, file = file name.xls ) What I want is to paste the file name (above) by taking the argument to the function as a file name help('paste')

[R] write.table read.table with Dates

2005-11-10 Thread JeeBee
I've found several similar issues with write.table/read.table with Dates on this list, but trying to follow this advice I still get an error. First, I read in data from several files, constructing several date/time columns using ISOdatetime str(Tall$Begin) 'POSIXct', format: chr [1:40114]

Re: [R] paste argument of a function as a file name

2005-11-10 Thread Romain Francois
Le 10.11.2005 14:28, Luis Ridao Cruz a écrit : R-help, I have a function which is exporting the output to a file via write.table(df, file = file name.xls ) What I want is to paste the file name (above) by taking the argument to the function as a file name something like this: MY.function-

Re: [R] paste argument of a function as a file name

2005-11-10 Thread Barry Rowlingson
Luis Ridao Cruz wrote: R-help, I have a function which is exporting the output to a file via write.table(df, file = file name.xls ) What I want is to paste the file name (above) by taking the argument to the function as a file name something like this: More like this: foo =

Re: [R] paste argument of a function as a file name

2005-11-10 Thread Adaikalavan Ramasamy
my.write - function( obj, name ){ filename - file=paste( name, .txt, sep=) write.table( obj, file=filename, sep=\t, quote=F) } my.write( df, output ) Regards, Adai On Thu, 2005-11-10 at 13:28 +, Luis Ridao Cruz wrote: R-help, I have a function which is exporting the output to a

Re: [R] paste argument of a function as a file name

2005-11-10 Thread Frede Aakmann Tøgersen
Why not use something like MY.function - function(x){ filn - deparse(substitute(x)) filename - paste(filn,xls,sep=.) ... ... write.table(x,file=filename) } Med venlig hilsen Frede Aakmann Tøgersen -Oprindelig meddelelse- Fra: [EMAIL PROTECTED] [mailto:[EMAIL

Re: [R] Remove levels

2005-11-10 Thread Uwe Ligges
Marc Bernard wrote: Daer All, I have a factor variable, X with 5 levels. When I type tables(X) it gives me: table(X) 1 2 34 5 10 50 0 0 How to drop the levels with zeros such that when I will type: table(X) it will give me: table(X) 1 2 10 5

Re: [R] How to find statistics like that.

2005-11-10 Thread Duncan Murdoch
On 11/10/2005 7:31 AM, Adaikalavan Ramasamy wrote: If my usage is wrong please correct me. Thank you. Here are my reason : 1. p-value is a (cumulative) probability and always ranges from 0 to 1. A test statistic depending on its definition can wider range of possible values. 2. A test

Re: [R] paste argument of a function as a file name

2005-11-10 Thread Uwe Ligges
Luis Ridao Cruz wrote: R-help, I have a function which is exporting the output to a file via write.table(df, file = file name.xls ) What I want is to paste the file name (above) by taking the argument to the function as a file name something like this: MY.function- function(df)

Re: [R] Remove levels

2005-11-10 Thread Peter Dalgaard
Marc Bernard [EMAIL PROTECTED] writes: Daer All, I have a factor variable, X with 5 levels. When I type tables(X) it gives me: table(X) 1 2 34 5 10 50 0 0 How to drop the levels with zeros such that when I will type: table(X) it will give me: table(X)

Re: [R] How to find statistics like that.

2005-11-10 Thread Mike Miller
On Thu, 10 Nov 2005, Ruben Roa wrote: A statistic is any real-valued or vector-valued function whose domain includes the sample space of a random sample. The p-value is a real-valued function and its domain includes the sample space of a random sample. The p-value has a sampling

Re: [R] write.table read.table with Dates

2005-11-10 Thread Gabor Grothendieck
On 11/10/05, JeeBee [EMAIL PROTECTED] wrote: I've found several similar issues with write.table/read.table with Dates on this list, but trying to follow this advice I still get an error. First, I read in data from several files, constructing several date/time columns using ISOdatetime

Re: [R] How to find statistics like that.

2005-11-10 Thread Ruben Roa
-Original Message- From: Mike Miller [SMTP:[EMAIL PROTECTED] Sent: Thursday, November 10, 2005 12:32 PM To: Ruben Roa Cc: [EMAIL PROTECTED]; Duncan Murdoch; r-help@stat.math.ethz.ch Subject: Re: [R] How to find statistics like that. On Thu, 10 Nov 2005, Ruben Roa wrote:

Re: [R] Interpretation of output from glm

2005-11-10 Thread John Fox
Dear Pedro, The basic point, which relates to the principle of marginality in formulating linear models, applies whether the predictors are factors, covariates, or both. I think that this is a common topic in books on linear models; I certainly discuss it in my Applied Regression, Linear Models,

[R] Fonts, Plus

2005-11-10 Thread ivo welch
Dear R Wizards: sorry, I need more help. hopefully, it will help others in the future. I am using R 2.2.0 Patched (2005-11-07 r36217). [a] # copy from the postscriptFont documentation CMitalic - postscriptFont(ComputerModern, c(CM_regular_10.afm, CM_boldx_10.afm,

Re: [R] write.table read.table with Dates

2005-11-10 Thread JeeBee
I see that strptime returns a list of year, mon, mday, hour, min, sec, etc. The following works for me (for each column that is a date/time field in my imported file) cat(Converting date/time fields...\n) Q = strptime(as.character(data$myfield), format=%Y-%m-%d%H:%M:%S) data$myfield =

Re: [R] write.table read.table with Dates

2005-11-10 Thread Prof Brian Ripley
On Thu, 10 Nov 2005, JeeBee wrote: I've found several similar issues with write.table/read.table with Dates on this list, but trying to follow this advice I still get an error. First, I read in data from several files, constructing several date/time columns using ISOdatetime

[R] R-help: conversion of long decimal numbers into hexadecimal

2005-11-10 Thread Antje Döring
Hi there, could somebody help me to convert a decimal number into a hexadecimal number? I know that there is the function sprintf, but the numbers I want to convert consist of 20 or more numbers. Spintf is not able to convert these big numbers. Thanks for any help. Antje

[R] question about the dataset fgl

2005-11-10 Thread Huh, Seungho
Dear sir or ma'am, I have a question about the dataset fgl. The dataset seems to be in the VR package, so I tried to download it from CRAN. However, after downloading, when I tried to load the package, it was not in my package list. I am wondering what is wrong. Any advice on how to access

[R] estimating significance P-value between 2 matricesv

2005-11-10 Thread balaji
Hi all, Being a new user of R I am having some troubles, I hope to get some solutions.., I have tried looking everywhere but so far not been so successful. i have two matrices mat1=[1:26], mat2[1:47] there are some missing values in mat1[5:6,15:26] I want to calculate Pearson correlation r

[R] different functions on different vector subsets

2005-11-10 Thread Ron Ophir
Hi, I am trying to apply two different functions on on a vector as follow: a-c(NA,1,2,3,-3,-4,-6) if a0 I would like to raise it by the power of 2: 2^a and if the a0 I would like to have the inverse value, i.e., -1/2^a. so I thought of doing it two steps: a[a0]-2^[a0] a[a0]-(-1)/2^a[a0] I got the

[R] error in rowSums:'x' must be numeric

2005-11-10 Thread Illyes Eszter
Dear All, It's Eszter again from Hungary. I could not solve my problem form yesterday, so I still have to ask your help. I have a binary dataset of vegetation samples and species as a comma separated file. I would like to calculate the Jaccard distance of the dataset. I have the following

Re: [R] How to find statistics like that.

2005-11-10 Thread Duncan Murdoch
On 11/10/2005 9:32 AM, Mike Miller wrote: On Thu, 10 Nov 2005, Ruben Roa wrote: A statistic is any real-valued or vector-valued function whose domain includes the sample space of a random sample. The p-value is a real-valued function and its domain includes the sample space of a random

[R] ltext - adding text to each panel from a matrix

2005-11-10 Thread Andy Bunn
Hi all (really probably just Deepayan): In the plot below I want to add text on either side of each violin plot that indicates the number of observations that are either positive or negative. I'm trying to do this with ltext() and I've also monkeyed about with panel.text(). The code below is

[R] R-help: conversion of long decimal numbers into hexadecimal numbers

2005-11-10 Thread Antje Döring
Hi there, could somebody help me to convert a decimal number into a hexadecimal number? I know that there is the function sprintf, but the numbers I want to convert consist of 20 or more numbers. Spintf is not able to convert these big numbers. Thanks for any help. Antje Döring

Re: [R] question about the dataset fgl

2005-11-10 Thread Liaw, Andy
`VR' is a bundle consisting of `MASS', `class', `nnet' and `spatial', as the description says. The fgl data is in the MASS package, so you need to load that one. In any case, data() would have told you that after the bundle is installed. Andy From: Huh, Seungho Dear sir or ma'am, I

[R] Help regarding mas5 normalization

2005-11-10 Thread Nayeem Quayum
Hello everybody, I am trying to use mas5 to normalize some array data and using mas5 and mas5calls. But I received these warning message. If anybody can explain the problem I would really appreciate that. Thanks in advance. background correction: mas PM/MM correction : mas expression values: mas

[R] order statistics / sample quantiles

2005-11-10 Thread Bickel, David
Are there any R functions or packages that can compute distributions, expectations, or quantiles of order statistics (or sample quantiles or extreme values) for a given distribution such as a normal distribution? Both exact and asymptotic calculations are of interest. I am already aware of the

Re: [R] different functions on different vector subsets

2005-11-10 Thread Berton Gunter
The error messages mean what they say. I am trying to apply two different functions on on a vector as follow: a-c(NA,1,2,3,-3,-4,-6) if a0 I would like to raise it by the power of 2: 2^a and if the a0 I would like to have the inverse value, i.e., -1/2^a. ## I assume you mean 1/(2^a). If

Re: [R] different functions on different vector subsets

2005-11-10 Thread Thomas Lumley
On Thu, 10 Nov 2005, Ron Ophir wrote: Hi, I am trying to apply two different functions on on a vector as follow: a-c(NA,1,2,3,-3,-4,-6) if a0 I would like to raise it by the power of 2: 2^a and if the a0 I would like to have the inverse value, i.e., -1/2^a. so I thought of doing it two

Re: [R] different functions on different vector subsets

2005-11-10 Thread Berton Gunter
Oops. Sorry. Should be: sign(a)*2^a where I assume you meant the inverse value should be -1/2^|a| = - 2^a for a0 -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA The business of the statistician is to catalyze the scientific learning process. - George E. P. Box

[R] Concurrent structures

2005-11-10 Thread Michael Kubovy
@BOOK{Mandel1995, title = {Analysis of two-way layouts}, publisher = {Chapman \ Hall}, year = {1995}, address = {New York, NY, USA}, author = {John Mandel}, } describes diagnostics for identifying concurrent structures (i.e., y_ {ij} = A + B_{i} * C_{j} + e_{ij} ). Does anyone

Re: [R] R-help: conversion of long decimal numbers into hexadeci

2005-11-10 Thread Ted Harding
On 10-Nov-05 Antje Döring wrote: Hi there, could somebody help me to convert a decimal number into a hexadecimal number? I know that there is the function sprintf, but the numbers I want to convert consist of 20 or more numbers. Spintf is not able to convert these big numbers. If I

Re: [R] different functions on different vector subsets

2005-11-10 Thread Prof Brian Ripley
On Thu, 10 Nov 2005, Ron Ophir wrote: Hi, I am trying to apply two different functions on on a vector as follow: a-c(NA,1,2,3,-3,-4,-6) if a0 I would like to raise it by the power of 2: 2^a and if the a0 I would like to have the inverse value, i.e., -1/2^a. so I thought of doing it two

Re: [R] ltext - adding text to each panel from a matrix

2005-11-10 Thread Austin, Matt
Haven't checked it too carefully, but how about: bwplot(treatment~foo|group, data = dat, panel=function(x,y,...) { panel.violin(x,y, ..., col = transparent, varwidth = F) gt0 - table( x 0, y) panel.abline(v=0, lty = dotted)

[R] specifying a key for a trellis display

2005-11-10 Thread Berton Gunter
Folks: The key argument of trellis commands (e.g. xyplot()) allows one to place a key at the top of a trellis display using key=list(space='top',...) I would like to increase the space between the bottom of the key and the trellis plots beyond the default. Is there a simple way to do this? At

Re: [R] ltext - adding text to each panel from a matrix

2005-11-10 Thread Deepayan Sarkar
On 11/10/05, Andy Bunn [EMAIL PROTECTED] wrote: Hi all (really probably just Deepayan): In the plot below I want to add text on either side of each violin plot that indicates the number of observations that are either positive or negative. I'm trying to do this with ltext() and I've also

Re: [R] write.table read.table with Dates

2005-11-10 Thread Don MacQueen
In addition to the solutions already provided, note that if *all* you want to do is save your dataframe in a file, and later recreate it from that file, you can use dump(). dump('Tall',file='Tall.r') rm(Tall) ## just to demonstrate that the next command will recreate Tall source('Tall.r')

Re: [R] order statistics / sample quantiles

2005-11-10 Thread Thomas Lumley
On Thu, 10 Nov 2005, Bickel, David wrote: Are there any R functions or packages that can compute distributions, expectations, or quantiles of order statistics (or sample quantiles or extreme values) for a given distribution such as a normal distribution? Both exact and asymptotic calculations

Re: [R] specifying a key for a trellis display

2005-11-10 Thread Deepayan Sarkar
On 11/10/05, Berton Gunter [EMAIL PROTECTED] wrote: Folks: The key argument of trellis commands (e.g. xyplot()) allows one to place a key at the top of a trellis display using key=list(space='top',...) I would like to increase the space between the bottom of the key and the trellis plots

Re: [R] specifying a key for a trellis display

2005-11-10 Thread Berton Gunter
Many thanks, Deepayan. As I suspected... I'll fool around with these key arguments to see what they do. -- Bert -Original Message- From: Deepayan Sarkar [mailto:[EMAIL PROTECTED] Sent: Thursday, November 10, 2005 11:31 AM To: Berton Gunter Cc: r-help@stat.math.ethz.ch Subject:

Re: [R] different functions on different vector subsets

2005-11-10 Thread Ron Ophir
Thanks Thomas, ...For logical subscripts you could argue that the ambiguity isn't present and that if the index was NA the element should just be set to NA. This change might be worth making. I see you got my point. NA should return NA no matter what the comparison is. But any way thanks

Re: [R] different functions on different vector subsets

2005-11-10 Thread Prof Brian Ripley
On Thu, 10 Nov 2005, Thomas Lumley wrote: On Thu, 10 Nov 2005, Ron Ophir wrote: Hi, I am trying to apply two different functions on on a vector as follow: a-c(NA,1,2,3,-3,-4,-6) if a0 I would like to raise it by the power of 2: 2^a and if the a0 I would like to have the inverse value,

[R] grid.remove() doesn't remove output

2005-11-10 Thread Zepu Zhang
I've found that grid.remove() doesn't clear the output when the grob is the only one on the device (or viewport; I didn't test it). For example: library(grid) grid.newpage() grid.circle(name=cir, x=.5, y=.5, r=.3, gp=gpar(lwd=5)) grid.lines(c(.2, .8), c(.3, .7), name=lin) grid.remove(cir)

Re: [R] different functions on different vector subsets

2005-11-10 Thread Thomas Lumley
On Thu, 10 Nov 2005, Ron Ophir wrote: Thanks Thomas, ...For logical subscripts you could argue that the ambiguity isn't present and that if the index was NA the element should just be set to NA. This change might be worth making. I see you got my point. NA should return NA no matter what

Re: [R] different functions on different vector subsets

2005-11-10 Thread Thomas Lumley
On Thu, 10 Nov 2005, Thomas Lumley wrote: On Thu, 10 Nov 2005, Ron Ophir wrote: Thanks Thomas, ...For logical subscripts you could argue that the ambiguity isn't present and that if the index was NA the element should just be set to NA. This change might be worth making. I see you got

[R] make check failed on linux-amd64 using PGI compilers

2005-11-10 Thread Liaw, Andy
Dear R-help, I am trying to build R-2.2.0-patched (2005-11-07 r36217) on the head node of a Scyld cluster (dual Opteron 250s) using PGI compilers (v6.0). I used the flags suggested by Jennifer Lai on R-devel (taken from R-admin, except that I had to add -L/usr/X11R6/lib64 to LDFLAGS). The build

[R] IF/Else

2005-11-10 Thread Guenther, Cameron
Hi, I am trying to write a for loop with if else statements to calculate biomass density estimates for different types of sampling gear. My code is: bmd=for (i in 1:length(Gear)){ if (Gear==20) {bioden=Biomass/141} else {if (Gear==23) {bioden=Biomass/68}} else {if (Gear==160)

[R] How to export multiple files using write.table in the loop?

2005-11-10 Thread alice.0309
Hi, I tried to split a big file into some small files seperately by R. I can only do that writing duplicated codes. When I tried to write a loop, I only got one appned or destroyed exported file. For example: data1- read.table(file = C:\\Alice\\MBEI.txt, sep=\t, check.names=FALSE)

[R] converting a character string to a subscripted numeric variable

2005-11-10 Thread Charles Annis, P.E.
Dear R-helpers: It seems that I have a mental block. (Some say that it sits atop my shoulders.) For reasons too tedious to retell I have an R object: input.line[7] [1] -13.24, -11.24, -9.24, -7.24, -5.24, -3.24, -1.24, 0.76, 2.76, 4.76, 6.76, 8.76, 10.76, 12.76, 14.76, 16.76, 18.76, 20.76,

Re: [R] converting a character string to a subscripted numeric variable

2005-11-10 Thread Sundar Dorai-Raj
Charles Annis, P.E. wrote: Dear R-helpers: It seems that I have a mental block. (Some say that it sits atop my shoulders.) For reasons too tedious to retell I have an R object: input.line[7] [1] -13.24, -11.24, -9.24, -7.24, -5.24, -3.24, -1.24, 0.76, 2.76, 4.76, 6.76, 8.76,

Re: [R] converting a character string to a subscripted numeric variable

2005-11-10 Thread Charles Annis, P.E.
Eternal gratitude to Sunbar and Matt and Patrick! The easy solution is Beta - as.numeric(strsplit(input.line [7], ,)[[1]]) Beta - Beta[!is.na(Beta)] Beta I have a slew of files to interrogate and need to know from some of the input, what to look for in the remainder of the input. Thanks to

Re: [R] make check failed on linux-amd64 using PGI compilers

2005-11-10 Thread Peter Dalgaard
Liaw, Andy [EMAIL PROTECTED] writes: Dear R-help, I am trying to build R-2.2.0-patched (2005-11-07 r36217) on the head node of a Scyld cluster (dual Opteron 250s) using PGI compilers (v6.0). I used the flags suggested by Jennifer Lai on R-devel (taken from R-admin, except that I had to

Re: [R] converting a character string to a subscripted numeric variable

2005-11-10 Thread Peter Dalgaard
Charles Annis, P.E. [EMAIL PROTECTED] writes: Eternal gratitude to Sunbar and Matt and Patrick! The easy solution is Beta - as.numeric(strsplit(input.line [7], ,)[[1]]) Beta - Beta[!is.na(Beta)] Beta Also x - input.line [7] eval(parse(text=paste(c(, x, or x - sub(, *$,,x)

Re: [R] IF/Else

2005-11-10 Thread Ted Harding
On 10-Nov-05 Guenther, Cameron wrote: Hi, I am trying to write a for loop with if else statements to calculate biomass density estimates for different types of sampling gear. My code is: bmd=for (i in 1:length(Gear)){ if (Gear==20) {bioden=Biomass/141} else {if (Gear==23)

Re: [R] make check failed on linux-amd64 using PGI compilers

2005-11-10 Thread Liaw, Andy
From: [EMAIL PROTECTED] Liaw, Andy [EMAIL PROTECTED] writes: Dear R-help, I am trying to build R-2.2.0-patched (2005-11-07 r36217) on the head node of a Scyld cluster (dual Opteron 250s) using PGI compilers (v6.0). I used the flags suggested by Jennifer Lai on R-devel (taken

Re: [R] Interpretation of output from glm

2005-11-10 Thread Pedro de Barros
Dear John, Thanks for the pointers. I will read this. Pedro At 14:41 10/11/2005, you wrote: Dear Pedro, The basic point, which relates to the principle of marginality in formulating linear models, applies whether the predictors are factors, covariates, or both. I think that this is a common

Re: [R] IF/Else

2005-11-10 Thread Gabor Grothendieck
Try using switch: bioden - Biomass / switch(paste(Gear), `20` = 141, `23` = 68, # ... fill in the ones I have omitted ..., `301` = DIST_TOW*4*1853) On 11/10/05, Guenther, Cameron [EMAIL PROTECTED] wrote: Hi, I am trying to write a for loop with if else statements to

Re: [R] How to export multiple files using write.table in the loop?

2005-11-10 Thread Gabor Grothendieck
Try this: col.list - list(1:3, c(1,4:5)) for(cols in col.list) write.table(data1[,cols], ...whatever...) On 11/10/05, alice.0309 [EMAIL PROTECTED] wrote: Hi, I tried to split a big file into some small files seperately by R. I can only do that writing duplicated codes. When I tried to

[R] following Appendix A results in plot.new has not been called yet

2005-11-10 Thread durbano
Hello. I was exploring the R software package and received the error message plot.new has not been called yet when following Appendix A A Sample Session of R-intro.pdf. I searched the message archives and found no similiar report to mine. I am using R on CentOS and I am using the latest from

Re: [R] following Appendix A results in plot.new has not been called yet

2005-11-10 Thread Gabor Grothendieck
You left out y - rnorm(x) On 11/10/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello. I was exploring the R software package and received the error message plot.new has not been called yet when following Appendix A A Sample Session of R-intro.pdf. I searched the message archives and

Re: [R] Help regarding mas5 normalization

2005-11-10 Thread Adaikalavan Ramasamy
Please do not post to both BioConductor and R. On Thu, 2005-11-10 at 09:51 -0700, Nayeem Quayum wrote: Hello everybody, I am trying to use mas5 to normalize some array data and using mas5 and mas5calls. But I received these warning message. If anybody can explain the problem I would really

Re: [R] How to export multiple files using write.table in the loop?

2005-11-10 Thread alice.0309
Hi Gabor, Thank you very very much for your help! I'm still a little confused. Let me re-state my problems here: There are 29 columns in my large dataset(with 5 rows) I need to split out 14 different files like this: Col1, Col2, Col3--split1.txt Col1, Col4, Col5--split2.txt . .

Re: [R] How to export multiple files using write.table in the loop?

2005-11-10 Thread alice.0309
Hello! I've solved the problems so don't bother. I can use Paste function like this: i - 1 while (i 15) { s-data.frame(data1[,1],data1[,(2*i)],data1[,(2*i+1)]) write.table(s,paste(F:\\s.txt,i,sep=.),quote=FALSE,row.names=FALSE,col.names=FALSE) i - i+1; } Thank you very much and sorry for

Re: [R] How to export multiple files using write.table in the loop?

2005-11-10 Thread Gabor Grothendieck
In that case you can simplify it a bit like this: fn - /s.txt for(i in 1:14) write.table(data1[, c(1, 2*i, 2*i+1)], paste(fn, i, sep = .), quote = FALSE, row.names = FALSE, col.names = FALSE) On 11/10/05, alice.0309 [EMAIL PROTECTED] wrote: Hello! I've solved the problems so

[R] undefined symbol in grDevices.so

2005-11-10 Thread Juan Pablo Romero
Hello I'm trying to use rpy with latest R (2.2.0), but unfortunately it seems there is some kind of undefined symbol in grDevices.so (utf8locale) Within python, this message appears: import rpy Error in dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library

Re: [R] strange classification behaviour

2005-11-10 Thread Gabor Grothendieck
You could use cut. The key calculation would be: w - .05; eps - 1e-5 breakpoints - seq(min(kk), max(kk), .05) breakpoints - floor( (breakpoints + (w/2) + eps) / w) * w values - cut(kk, c(breakpoints, Inf), right = FALSE) values - ordered(values) If you don't like the labels

[R] R on Windows XP x64

2005-11-10 Thread Feng Tai
Hi, I am running R 2.2.0 on the Windows XP x64. The mechanism of error hanlder seems different. It will take a very long time to pop up a error message diaglog box, even when some simple errors happen such as Syntax error or object not found. Does anybody have the similar experience? Thanks

Re: [R] error in rowSums:'x' must be numeric

2005-11-10 Thread Jari Oksanen
On Thu, 2005-11-10 at 16:49 +0100, Illyes Eszter wrote: Dear All, It's Eszter again from Hungary. I could not solve my problem form yesterday, so I still have to ask your help. I have a binary dataset of vegetation samples and species as a comma separated file. I would like to