Re: [R] Trellis.par.set/ family/ global change font?

2006-06-29 Thread Prof Brian Ripley
On Fri, 30 Jun 2006, Renaud Lancelot wrote: > A radical solution is to edit the file .../etc/Rdevga and to change > the definition of the first set of fonts, e.g. > > # TT Arial : plain > # TT Arial : bold > # TT Arial : italic > # TT Arial : bold&italic > > TT Times New Roman : plain > TT Times N

Re: [R] Trellis.par.set/ family/ global change font?

2006-06-29 Thread Renaud Lancelot
A radical solution is to edit the file .../etc/Rdevga and to change the definition of the first set of fonts, e.g. # TT Arial : plain # TT Arial : bold # TT Arial : italic # TT Arial : bold&italic TT Times New Roman : plain TT Times New Roman : bold TT Times New Roman : italic TT Times New Roman

[R] Empirical CDF

2006-06-29 Thread Augusto.Sanabria
Good day everyone, I want to assess the error when fitting a Gram-Charlier CDF to some data 'ws', that is, I want to calculate: Err = |ecdf(ws) - GCh_ser(ws)| The problem is, I cannot get the F(x) values from the ecdf. 'Summary(ecdf())' returns some of the x-axis values, but how do you ge

Re: [R] aggregate data.frame by one column

2006-06-29 Thread Guo Wei-Wei
Hi Andrew, Thank you very much! It works so well than I can expect. All the best, Wei-Wei 2006/6/30, Andrew Robinson <[EMAIL PROTECTED]>: > Hi Wei-Wei, > > try this: > > eva.agg <- aggregate(x = list( >VC1=eva$VC1, >EO1=eva$EO1, >

Re: [R] aggregate data.frame by one column

2006-06-29 Thread Andrew Robinson
Hi Wei-Wei, try this: eva.agg <- aggregate(x = list( VC1=eva$VC1, EO1=eva$EO1, EO2=eva$EO2, EO3=eva$EO3, EO4=eva$EO4, EO5=eva$EO5 ),

Re: [R] Trellis.par.set/ family/ global change font?

2006-06-29 Thread Deepayan Sarkar
On 6/29/06, McClatchie, Sam (PIRSA-SARDI) <[EMAIL PROTECTED]> wrote: > Background: > OS: Linux Ubuntu Dapper 6.06 > release: R 2.3.1 > editor: GNU Emacs 21.4.1 > front-end: ESS 5.2.3 > - > > Colleagues > > I have a rather complicated trellis plot that a journal edito

[R] aggregate data.frame by one column

2006-06-29 Thread Guo Wei-Wei
Hi, everyone, I have a data.frame named "eva" like this: IND PARTNO VC1 EO1 EO2 EO3 EO4 EO5 114 114001 2 5 4 4 5 4 114 114001 2 4 4 4 4 4 114 114001 2 4 NA NA NA NA 112 112002 2 3 3 6 2 6 112 112002 2 1 1 3 4 4 112 112003 2 6 6 6 5

Re: [R] lme convergence

2006-06-29 Thread Spencer Graves
Does anyone know how to obtain the 'returnObject' from an 'lme' run that fails to converge? An argument of this name is described on the 'lmeControl' help page as, "a logical value indicating whether the fitted object should be returned when the maximum number of iterations is reache

[R] Trellis.par.set/ family/ global change font?

2006-06-29 Thread McClatchie, Sam \(PIRSA-SARDI\)
Background: OS: Linux Ubuntu Dapper 6.06 release: R 2.3.1 editor: GNU Emacs 21.4.1 front-end: ESS 5.2.3 - Colleagues I have a rather complicated trellis plot that a journal editor has requested I edit and change all the fonts to times. I'd like to change all fon

Re: [R] How to use a for loop to generate two sequences

2006-06-29 Thread Gabor Grothendieck
On 6/29/06, Xiaohua Dai <[EMAIL PROTECTED]> wrote: > I followed your method but there was an error on FUN get: > > > nm <- paste("test", 1:1000, sep = "") > > lapply(nm, get) > Error in get(x, envir, mode, inherits) : variable "test1" was not found > > L <- sapply(paste("test", 1:1000, sep = ""), g

Re: [R] Extracting R plots from MS Word

2006-06-29 Thread Gabor Grothendieck
I think these are zipped emf and wmf files. Google for emz extension. On 6/29/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Thanks to all those who responded to my request about extracting R plots > from MS Word. I decided to try Gabor Grothendieck's second suggestion and > saved the Word do

Re: [R] Extracting R plots from MS Word

2006-06-29 Thread maj
Thanks to all those who responded to my request about extracting R plots from MS Word. I decided to try Gabor Grothendieck's second suggestion and saved the Word document as html. (I may yet try some of the other suggestions.) Saving the .doc as .htm indeed produced a folder with many of the image

Re: [R] How to use a for loop to generate two sequences

2006-06-29 Thread Xiaohua Dai
I followed your method but there was an error on FUN get: > nm <- paste("test", 1:1000, sep = "") > lapply(nm, get) Error in get(x, envir, mode, inherits) : variable "test1" was not found > L <- sapply(paste("test", 1:1000, sep = ""), get, simplify = FALSE) Error in get(x, envir, mode, inherits) :

Re: [R] NLME Fitting

2006-06-29 Thread Spencer Graves
I'm not certain what you want, but it sounds like the answer might be in '?nlme' help page. Toward the end, it describes the 'Value' returned as follows: an object of class 'nlme' representing the nonlinear mixed-effects model fit. Generic functions such as 'print', 'plot' a

Re: [R] Reporting ppr fits and using them externally.

2006-06-29 Thread Robert Chatfield
A couple days of detective work have gone along way to reveal how one may recover the actual knots and coefficients of the splines used in ppr. It's not finished yet, but I may be due some mid-course correction. First, ... I was asked, ... why? On Jun 27, 2006, at 11:50 PM, Prof Brian Ripley wr

Re: [R] How to use a for loop to generate two sequences

2006-06-29 Thread Gabor Grothendieck
A vector of character strings: nm <- paste("test", 1:1000, sep = "") A list whose components are the objects: test1, test2, ... lapply(nm, get) or if you do it this way the list will have 'test1', 'test2', ... as the component names: L <- sapply(paste("test", 1:1000, sep = ""), get, simp

Re: [R] Passing argument in nested function calls

2006-06-29 Thread Gabor Grothendieck
getArgs should be: getArgs <- function(...) extractArgs(...) # test extractArgs(x = 3) getArgs(x = 3) On 6/29/06, Aarti Dahiya <[EMAIL PROTECTED]> wrote: > Please, do not ask why you would do this. I have simplified my complicated > code to just the basic problem occuring to be able to make it

[R] help with coxme

2006-06-29 Thread Lei Liu
Hi there, I have a question on fitting data by coxme. In particular I want to fit a random intercept and random slope cox model. Using the rats dataset as an example, I generated another covariate x2 and want to specify a random slope for x2. Here is my code: x2=matrix(rep(runif(50), 3), 50, 3

Re: [R] Transform Normal Dist to ArcTan Dist

2006-06-29 Thread Ben Bolker
Luis Cota avmltd.com> writes: > > I have a set of data that is distributed normally. How can I transform > this data to fit an ArcTan distribution? > > [[alternative HTML version deleted]] > > __ > R-help stat.math.ethz.ch mailing list > http

[R] Passing argument in nested function calls

2006-06-29 Thread Aarti Dahiya
Please, do not ask why you would do this. I have simplified my complicated code to just the basic problem occuring to be able to make it easier to understand the actual problem. I have two function getArgs() and extractArgs() - code and test results provided below. I test them using getArgs(id

Re: [R] cat and positioning of the output

2006-06-29 Thread Michael H. Prager
It works on Windows (rgui.exe) with this change: for ( i in 1:10 ) { cat("Number",i,"\r"); flush.console(); Sys.sleep(1) }; cat("\n") MHP on 6/29/2006 4:33 PM Dan Gunter said the following: > =?ANSI_X3.4-1968?Q?J=3Frn_Schulz?= wrote: > >> Hello R users! >> >> I like to use cat in a loop. I

Re: [R] cat and positioning of the output

2006-06-29 Thread Philippe Grosjean
Dan Gunter wrote: > =?ANSI_X3.4-1968?Q?J=3Frn_Schulz?= wrote: > >>Hello R users! >> >>I like to use cat in a loop. I know, loops are not the best way in R ... but >>my question: It is possible to overwrite the expression "Reading row: i" in >>each iteration of the loop (print out in the below loop

Re: [R] cat and positioning of the output

2006-06-29 Thread Dan Gunter
=?ANSI_X3.4-1968?Q?J=3Frn_Schulz?= wrote: > Hello R users! > > I like to use cat in a loop. I know, loops are not the best way in R ... but > my question: It is possible to overwrite the expression "Reading row: i" in > each iteration of the loop (print out in the below loop on the screen) or > mor

Re: [R] cat and positioning of the output

2006-06-29 Thread Philippe Grosjean
=?ANSI_X3.4-1968?Q?J=3Frn_Schulz?= wrote: > Hello R users! > > I like to use cat in a loop. I know, loops are not the best way in R ... but > my question: It is possible to overwrite the expression "Reading row: i" in > each iteration of the loop (print out in the below loop on the screen) or > m

Re: [R] cat and positioning of the output

2006-06-29 Thread Gabor Grothendieck
On Windows XP this works for me: for(i in 1:3) { if (i > 1) cat("\b"); cat(i); flush.console(); Sys.sleep(1) }; cat("\n") It displays 1, then it overwrites it with 2 and then overwrites that with 3. On 6/29/06, J?rn Schulz <[EMAIL PROTECTED]> wrote: > > Hello R users! > > I like to use cat in a

[R] cat and positioning of the output

2006-06-29 Thread J?rn Schulz
Hello R users! I like to use cat in a loop. I know, loops are not the best way in R ... but my question: It is possible to overwrite the expression "Reading row: i" in each iteration of the loop (print out in the below loop on the screen) or more particulary to overwrite the counter "i". for(i i

Re: [R] How to use a for loop to generate two sequences

2006-06-29 Thread Thomas Lumley
On Thu, 29 Jun 2006, Xiaohua Dai wrote: > Hi R users, > > Hope the question is not too simple: > > How to use a for loop to generate two lists as below: > > testlist <- list(test1, test2, ..., test1000) > stringlist <- list("test1","test2",...,"test1000") I don't know why you would want to use a

[R] How to use a for loop to generate two sequences

2006-06-29 Thread Xiaohua Dai
Hi R users, Hope the question is not too simple: How to use a for loop to generate two lists as below: testlist <- list(test1, test2, ..., test1000) stringlist <- list("test1","test2",...,"test1000") Thanks Xiaohua __ R-help@stat.math.ethz.ch mailing

Re: [R] Biobass, SAGx, and Jonckheere-Terpstra test

2006-06-29 Thread Prof Brian Ripley
It is *Biobase*. That is part of BioC (www.bioconductor.org), although I agree that it should make clear where to get non-CRAN packages. (Worse: SAGx used not to require it, and only the update to the most recent version does.) On Thu, 29 Jun 2006, Horace Tso wrote: > Hi list, > > I tried to

[R] Cointegration Test in R

2006-06-29 Thread Dennis Heidemann
Hello! I'm using the blrtest() function in the urca package to test cointegration relationships. Unfortunately, the hypothesis (restrictions on beta) specifies the same restriction on all cointegration vectors. Is there any possibility to specify different restrictions on the cointegration vector

Re: [R] RCOM Package

2006-06-29 Thread Gabor Grothendieck
Go into Excel, turn on macro recording, perform whatever operations you want and look at whatever code is generated for you. On 6/29/06, Thomas Sudler <[EMAIL PROTECTED]> wrote: > Hi list, > > I just installed the rcom package and tried to read/give out some values > from/to Excel. Altogether it w

[R] RCOM Package

2006-06-29 Thread Thomas Sudler
Hi list, I just installed the rcom package and tried to read/give out some values from/to Excel. Altogether it works great... but nevertheless I don't know how the syntax works or in other words: "Which command needs which parameters?" Is there somwhere a manual about this package with good ex

[R] Biobass, SAGx, and Jonckheere-Terpstra test

2006-06-29 Thread Horace Tso
Hi list, I tried to load the package SAGx and failed because it complains it's looking for the Biobass which is not there. Then I looked up the package list and Biobass is not found. I'm trying to run the Jonckheere-Terpstra test and from what I see in the R archive, SAGx is the only place it's

Re: [R] Internet Problem in R

2006-06-29 Thread Liaw, Andy
It could well be a firewall issue. Try adding --internet2 as argument to Rgui.exe in the target field of the shortcut for Rgui. Andy From: Elizabeth Purdom > > Hi, > > I have a student who's R seems to be unable to connect to the > internet. I have verified that her computer has internet >

[R] Internet Problem in R

2006-06-29 Thread Elizabeth Purdom
Hi, I have a student who's R seems to be unable to connect to the internet. I have verified that her computer has internet access that's working fine, but that R is not able to establish connections. For example, she cannot download packages for R from the URL site, cannot source webpages, or

Re: [R] specify y axis values

2006-06-29 Thread jim holtman
?axis > curve(2*x + 3, 0,10,xaxt='n',yaxt='n') > axis(1, at=seq(0,10)) > axis(2, at=seq(5,10)) > On 6/29/06, Marc Bernard <[EMAIL PROTECTED]> wrote: > > Dear All, > > I am looking how to specify the values on the y axis and x axis for a > curve function. > example: > > curve(2*x + 3, 0,10) gi

Re: [R] R server

2006-06-29 Thread Gabor Csardi
One approach would be to install R on a unix machine and let other machines connect to it via a standard X server. There might be other approaches though Gabor On Thu, Jun 29, 2006 at 12:05:40PM -0400, Li, Mike wrote: > Hi, > > I just installed R in Windows, it seems to me that R is a stand

[R] R server

2006-06-29 Thread Li, Mike
Hi, I just installed R in Windows, it seems to me that R is a standalone desktop application. Do you know if R has its server version which could handle multi-users, have several distinct R sessions and their own variables in Unix or Windows? I saw OpenStatServer, RStatServer available, can tho

Re: [R] Problems Creating an R package

2006-06-29 Thread Prof Brian Ripley
On Thu, 29 Jun 2006, Thomas Petzoldt wrote: > Hi Aarti > > src/ if you have source files in C or Fortran. > R/for the R sources. > > If you have no C or Fortran files, you should delete the src/ directory. > > The syntax error in your R function is simply that the "," is on a new > line so R

Re: [R] initializing table and filling it out

2006-06-29 Thread Gabor Grothendieck
If you use lapply you don't have to set up the storage area. Here is an example. I have used textConnection with character strings to make this reproducible but you can replace conn with a vector of filenames, # test data Lines1 <- " 1 2 3 4 " Lines2 <- " 11 12 13 14 " conn <- list(textConnect

Re: [R] superimposing histograms con't

2006-06-29 Thread Martin Maechler
> "Jeff" == Jeff Miller <[EMAIL PROTECTED]> > on Wed, 28 Jun 2006 16:20:39 -0400 writes: Jeff> I was just thinking about this last night. Jeff> I would like to do the same but WITH overlapping. Jeff> For example, I graph 2 sets of count data. Say the Jeff> bars for the

Re: [R] Problems Creating an R package

2006-06-29 Thread Thomas Petzoldt
Hi Aarti src/ if you have source files in C or Fortran. R/for the R sources. If you have no C or Fortran files, you should delete the src/ directory. The syntax error in your R function is simply that the "," is on a new line so R "thinks" that the line above is complete. Hope it helps Th

Re: [R] superimposing histograms con't

2006-06-29 Thread Martin Maechler
> "Bill" == Bill Shipley <[EMAIL PROTECTED]> > on Wed, 28 Jun 2006 15:53:35 -0400 writes: Bill> Earlier, I posted the following question: Bill> I want to superimpose histograms from three Bill> populations onto the same graph, changing the shading Bill> of the bars for

[R] initializing table and filling it out

2006-06-29 Thread Cuau
Hi everyone, I'm writting a script that will open multiple files in a single folder and then will do some calculations to finally save everything in a big table. So here is the pseudo code #read all files in the given directory myfiles <-list.files("c:\\myDir") #initi

Re: [R] Extracting R plots from MS Word

2006-06-29 Thread Philipp Pagel
On Thu, Jun 29, 2006 at 05:15:08PM +1200, [EMAIL PROTECTED] wrote: > I am revising a paper that I am a co-author of. The figures are plots > generated from R but at the moment I do not have the R code that generates > them. > > As this is time critical I would like to slightly abuse the list by as

[R] Problems Creating an R package

2006-06-29 Thread Aarti Dahiya
Hi all, When I check my package using "Rcmd check ..\myPackage\R.mykg" on Windows in Command Prompt, this is what get:- * using log directory 'C:/R/bin/R.getdata.Rcheck' * using Version 2.3.1 (2006-06-01) * checking for file 'R.getdata/DESCRIPTION' ... OK * checking extension type ... Package *

Re: [R] Problems using na.include

2006-06-29 Thread Frank E Harrell Jr
Greg Distiller wrote: > Hi > I am having problems using na.action=na.include in a nlme call. Basically I > am trying to run a particular model without including any covariates but my > dataset does include some covariates (factors) with missing values. My > understanding from the Pinheiro and Ba

Re: [R] Help needed understanding eval,quote,expression

2006-06-29 Thread toby_marks
Great help, & thanks to both of you. I actually think I get it. I think I was locked into eval(expression ... ) as the solution. I did search the archives for this question, but it must not have clicked with me.The Thomas Lumley R-help (February 2005) was on the money. I was missing t

[R] multivariate normality test

2006-06-29 Thread Remigijus Lapinskas
Hello, Could someone help me to explain the VERY big difference in applying two tests on multivariate normality: library(mvnormtest) data(EuStockMarkets) mshapiro.test(t(EuStockMarkets[15:29,1:4])) Shapiro-Wilk normality test data: Z W = 0.8161, p-value = 0.005955 and library(energy

Re: [R] smoothing splines and degrees of freedom

2006-06-29 Thread Spencer Graves
The help page for 'smooth.spline' says the argument 'df' is 'the desired equivalent number of degrees of freedom (trace of the smoother matrix).' It also explains that the output of 'smooth.spline' includes a component 'fit', and two components of 'fit' are 'knot' and 'coef'. To lear

[R] function in boot

2006-06-29 Thread YIHSU CHEN
Dear R users: I'm trying to use "boot" function under the package boot to run some bootstrapping. Basically, I have a df as follows. (The data is simplified for illustrative purpose.) V1 V2 V3 1 2 3 4 5 7 3 5 2 Say that I want bootrap among (V1,V2,V3) for 1000 times and calculate the

Re: [R] lmer - Is this reasonable output?

2006-06-29 Thread Dimitris Rizopoulos
Hello Rick, some comments below: o in lmer(), 'method = "ML"' and its counterpart "REML" refer to the case of linear mixed models; for GLMMs the methods currently available are PQL and Laplace. The control argument 'usePQL = FALSE' can be used when 'method = Laplace', and in fact specifies not

[R] lmer - Is this reasonable output?

2006-06-29 Thread Rick Bilonick
I'm estimating two models for data with n = 179 with four clusters (21, 70, 36, and 52) named siteid. I'm estimating a logistic regression model with random intercept and another version with random intercept and random slope for one of the independent variables. fit.1 <- lmer(glaucoma~(1|siteid)

Re: [R] boxplot of subset of factors, in an order of my choice [B roadcast]

2006-06-29 Thread Liaw, Andy
1. Use something like with(testResults, boxplot(score[test == "rTest"])) 2. testResults$test <- factor(as.character(testResults$test), levels=c("rTest", "gTest", "fTest")) [Substitute any order you like in the last line.] Andy From: Sumitrajit Dhar > > Hi

[R] boxplot of subset of factors, in an order of my choice

2006-06-29 Thread Sumitrajit Dhar
Hi Folks, Say I am working with the following data set: testResults: studtestscore 1 1 fTest 43 2 1 rTest 39 3 1 gTest 43 4 2 fTest 23 5 2 rTest 33 6

[R] Problems using na.include

2006-06-29 Thread Greg Distiller
Hi I am having problems using na.action=na.include in a nlme call. Basically I am trying to run a particular model without including any covariates but my dataset does include some covariates (factors) with missing values. My understanding from the Pinheiro and Bates book is that one would use

[R] specify y axis values

2006-06-29 Thread Marc Bernard
Dear All, I am looking how to specify the values on the y axis and x axis for a curve function. example: curve(2*x + 3, 0,10) gives me a range of x axis in (0,2,4,6,8,10) amd for yaxis (5,10,15,20). How to do in order to have the x axis in (0,1,2,3,4,5,6,7,8,9,10) and y axis in (

Re: [R] Running R

2006-06-29 Thread Pramod Anugu
Thank you Andy for your suggestion. I used the method 2 and was able to go upto Step 8. But When I type R # R Fatal error: unable to open the base package   1.  Tell configure exactly where to find the readline header files (by something like --with-readline=/where/the/files/are, check configure

Re: [R] numerical integration problem

2006-06-29 Thread Duncan Murdoch
On 6/29/2006 7:38 AM, Sundar Dorai-Raj wrote: > > przeszczepan wrote: >> Hi, >> >> I have got problems integrating the following function using "integrate": >> >> lambdat<-function(t){ >> tempT<-T[k,][!is.na(T[k,])]#available values from k-th row of matrix T >> tempJ<-J[k,][!is.na(J[k,])] >> >

Re: [R] numerical integration problem

2006-06-29 Thread Sundar Dorai-Raj
przeszczepan wrote: > Hi, > > I have got problems integrating the following function using "integrate": > > lambdat<-function(t){ > tempT<-T[k,][!is.na(T[k,])]#available values from k-th row of matrix T > tempJ<-J[k,][!is.na(J[k,])] > > hg<-length(tempT[tempT<=t & tempJ==0])#counts observatio

[R] numerical integration problem

2006-06-29 Thread przeszczepan
Hi, I have got problems integrating the following function using "integrate": lambdat<-function(t){ tempT<-T[k,][!is.na(T[k,])]#available values from k-th row of matrix T tempJ<-J[k,][!is.na(J[k,])] hg<-length(tempT[tempT<=t & tempJ==0])#counts observations satisfing the conditions ag<-length(

[R] Package Spatialkernel Annocement

2006-06-29 Thread Pingping Zheng
Hi, A new R package spatialkernel has been accepted by CRAN. Spatialkernel focuses on implementation of kernel regression methods proposed in Diggle P.J. et al (2005), J. R. Stat. Soc. C, 54, 3, 645-658 and kernel density estimation of inhomogeneous Poisson point process with edge-correction propo

Re: [R] using "rbinom" in C code gives me erroneous results... random variable is not random (always zero)...

2006-06-29 Thread Prof Brian Ripley
Your text has lost almost all the carriage returns: please do as we ask and not send HTML code. You appear not to be initializing the random seed in your code: the manual says: The C code behind @R{}'s @[EMAIL PROTECTED] functions can be accessed by including the header file @file{Rmath.h

Re: [R] Extracting R plots from MS Word

2006-06-29 Thread Jonathan Baron
Another way to do this is with OpenOffice (OO). Read the Word file into OO Writer. Cut the figure. Open OO Draw. Click Paste, and the figure appears in Draw. Save it as EPS, or whatever you like. This works for both EMF and WMF. > * [EMAIL PROTECTED] <[EMAIL PROTECTED]> [060629 08:30]: > >

Re: [R] re-direct to "more" or "less"

2006-06-29 Thread Gabor Grothendieck
The first few lines or last few lines of an object can often be viewed like this: head(iris) tail(iris) On 6/28/06, Mike Wolfgang <[EMAIL PROTECTED]> wrote: > Dear list, > > sometimes my function generates too much data and shows them on screen, i > cannot view first several lines until program

Re: [R] Very slow read.table on Linux, compared to Win2000 [Broad cast]

2006-06-29 Thread Alberto Murta
On Wednesday 28 June 2006 15:45, Patrick Connolly wrote: > On Wed, 28-Jun-2006 at 04:43PM -0700, Alberto Murta wrote: > |> I have a pentium 4 pc with 256 MB of RAM, so I made a text file, tab > |> > |> separated, with column names and 15000 x 483 integers: > |> > system("ls -l teste.txt") > |> > |>

Re: [R] Extracting R plots from MS Word

2006-06-29 Thread Gabor Grothendieck
Click the graphic, press ctrl-C to copy it to the clipboard and then using ctrl-V paste it into mspaint or Xnview (free, find it via google) or other graphics program and then save it from there. Which program will work will depend on the format of the image. Another possibility is to save the W

[R] using "rbinom" in C code gives me erroneous results... random variable is not random (always zero)...

2006-06-29 Thread Vumani Dlamini
Dear Listers, I am trying to use "rbinom" in my C code, but i always get zeros as output no matter the probability. Am not sure what I am doing wrong because the function has worked before. Attached in an example. Noticed that "rbinom" expects 'n' to be REAL. Regards, Vumani R 2.3.1 (2006-06-

Re: [R] zero.print in print.table after adding margins

2006-06-29 Thread Peter Dalgaard
"BXC (Bendix Carstensen)" <[EMAIL PROTECTED]> writes: > The function addmargins() adds margins to a table, but returns a matrix. > But even after converted to a table the print.zero="." option of > print.table() does not work: > > > x <- sample( 1:7, 20, replace=T ) > > y <- sample( 1:7, 20, repl

Re: [R] Running R [Broadcast]

2006-06-29 Thread Peter Dalgaard
"Liaw, Andy" <[EMAIL PROTECTED]> writes: > You have two choices (AFAIK): > > 1. Tell configure exactly where to find the readline header files (by > something like --with-readline=/where/the/files/are, check configure > --help). > > 2. Compile R without readline; i.e., configure --with-read

Re: [R] Mixing grid and base graphics--need help understanding this quirk

2006-06-29 Thread Paul Murrell
Hi Kevin Wright wrote: > My setup: Windows 2000, R 2.3.1 > > When I start a brand new session of R and paste the code below into R, > the graphic device shows "Some text" in the lower left corner. If I > paste the code into the command window again, then "Some text" does > not appear in the low

[R] zero.print in print.table after adding margins

2006-06-29 Thread BXC (Bendix Carstensen)
The function addmargins() adds margins to a table, but returns a matrix. But even after converted to a table the print.zero="." option of print.table() does not work: > x <- sample( 1:7, 20, replace=T ) > y <- sample( 1:7, 20, replace=T ) > tt <- table( x, y ) > tx <- as.table( addmargins( table(

Re: [R] Very slow read.table on Linux, compared to Win2000 [Broad cast]

2006-06-29 Thread Patrick Connolly
On Wed, 28-Jun-2006 at 04:43PM -0700, Alberto Murta wrote: |> I have a pentium 4 pc with 256 MB of RAM, so I made a text file, tab |> separated, with column names and 15000 x 483 integers: |> |> > system("ls -l teste.txt") |> -rw-r--r-- 1 amurta amurta 16998702 Jun 28 16:08 teste.txt |> |> t

Re: [R] kmeans clustering

2006-06-29 Thread Andrej Kastrin
richard mendes wrote: > Hello R list members, > > I'm a bio informatics student from the Leiden university > (netherlands). We were asked to make a program with different > clustering methods. The problem we are experiencing is the following. > > we have a matrix with data like the following > >

[R] kmeans clustering

2006-06-29 Thread richard mendes
Hello R list members, I'm a bio informatics student from the Leiden university (netherlands). We were asked to make a program with different clustering methods. The problem we are experiencing is the following. we have a matrix with data like the following research1research2

Re: [R] Running R [Broadcast]

2006-06-29 Thread Liaw, Andy
You have two choices (AFAIK): 1. Tell configure exactly where to find the readline header files (by something like --with-readline=/where/the/files/are, check configure --help). 2. Compile R without readline; i.e., configure --with-readline=no. Andy _ From: [EMAIL PROTECTED] on b

Re: [R] re-direct to "more" or "less"

2006-06-29 Thread Prof Brian Ripley
Please read the help before replying ... page(iris, method="print") does exactly what I understand was asked for. On Thu, 29 Jun 2006, Søren Højsgaard wrote: No - not like page(). Page (on windows) gives structure(list(Sepal.Length = c(5.1, 4.9, 4.7, 4.6, 5, 5.4, 4.6, 5, 4.4, 4.9, 5.4, 4.8

Re: [R] Help needed understanding eval,quote,expression

2006-06-29 Thread Prof Brian Ripley
On Thu, 29 Jun 2006, Joerg van den Hoff wrote: > Prof Brian Ripley wrote: >> You are missing eval(parse(text=)). E.g. >> >>> x <- list(y=list(y1="hello",y2="world"),z=list(z1="foo",z2="bar")) >> (what do you mean by the $ at the start of these lines?) >>> eval(parse(text="x$y$y1")) >> [1] "hello"

Re: [R] re-direct to "more" or "less"

2006-06-29 Thread Peter Dalgaard
Søren Højsgaard <[EMAIL PROTECTED]> writes: > No - not like page(). Page (on windows) gives > > structure(list(Sepal.Length = c(5.1, 4.9, 4.7, 4.6, 5, 5.4, 4.6, > 5, 4.4, 4.9, 5.4, 4.8, 4.8, 4.3, 5.8, 5.7, 5.4, 5.1, 5.7, 5.1, > 5.4, 5.1, 4.6, 5.1, 4.8, 5, 5, 5.2, 5.2, 4.7, 4.8, 5.4, 5.2, .

Re: [R] Help needed understanding eval,quote,expression

2006-06-29 Thread Joerg van den Hoff
Prof Brian Ripley wrote: > You are missing eval(parse(text=)). E.g. > >> x <- list(y=list(y1="hello",y2="world"),z=list(z1="foo",z2="bar")) > (what do you mean by the $ at the start of these lines?) >> eval(parse(text="x$y$y1")) > [1] "hello" > > However, bear in mind > >> fortune("parse") > >

Re: [R] re-direct to "more" or "less"

2006-06-29 Thread Søren Højsgaard
No - not like page(). Page (on windows) gives structure(list(Sepal.Length = c(5.1, 4.9, 4.7, 4.6, 5, 5.4, 4.6, 5, 4.4, 4.9, 5.4, 4.8, 4.8, 4.3, 5.8, 5.7, 5.4, 5.1, 5.7, 5.1, 5.4, 5.1, 4.6, 5.1, 4.8, 5, 5, 5.2, 5.2, 4.7, 4.8, 5.4, 5.2, . while the less() function below gives Sepal.Length Se

Re: [R] re-direct to "more" or "less"

2006-06-29 Thread Peter Dalgaard
Søren Højsgaard <[EMAIL PROTECTED]> writes: > Something like > > less <- function(a){ > fn <- paste(tempdir(),"\\dataframe.txt",sep='',collapse='') > write.table(a, quote=F, file=fn) > system(paste("less ",fn)) > } > > could perhaps help you (assuming that you have less on your computer).

Re: [R] Extracting R plots from MS Word

2006-06-29 Thread Johannes Ranke
Hi, I would also like to know how to do this with MS products alone. However, a nice tool to do this is wmf2eps (http://www.wmf2eps.de.vu/). You can paste windows vector graphics into wmf2eps, and it first saves it as EMF (enhanced metafile), before it creates EPS, which is what I use it for. Ma

Re: [R] Problem running one of the rgl demo scripts...

2006-06-29 Thread Brian Lunergan
Duncan Murdoch wrote: > Brian Lunergan wrote: >> Afternoon folks: >> >> I'm getting a program crash when I try to run demo(rgl). The following >> error details result: >> >> RGUI caused a stack fault in module NVOPENGL.DLL at 017f:695280f0. >> Registers: >> EAX=0002 CS=017f EIP=695280f0 EFLGS=

Re: [R] Help needed understanding eval,quote,expression

2006-06-29 Thread Prof Brian Ripley
You are missing eval(parse(text=)). E.g. > x <- list(y=list(y1="hello",y2="world"),z=list(z1="foo",z2="bar")) (what do you mean by the $ at the start of these lines?) > eval(parse(text="x$y$y1")) [1] "hello" However, bear in mind > fortune("parse") If the answer is parse() you should usually re

Re: [R] Error: evaluation nested too deeply: infinite recursion / options(expressions=)?

2006-06-29 Thread Uwe Ligges
Aarti Dahiya wrote: > I am getting this error:- Error: evaluation nested too deeply: infinite > recursion / options(expressions=)? The reason is probbaly because I am > calling methods within methods. Maybe at some point you get an infinite recursion because you forgot to "unclass" something?

Re: [R] re-direct to "more" or "less"

2006-06-29 Thread Søren Højsgaard
Something like less <- function(a){ fn <- paste(tempdir(),"\\dataframe.txt",sep='',collapse='') write.table(a, quote=F, file=fn) system(paste("less ",fn)) } could perhaps help you (assuming that you have less on your computer). I agree that it would be very nice to have a built-in version.

Re: [R] Question on memory allocation & loop

2006-06-29 Thread Prof Brian Ripley
On Thu, 29 Jun 2006, Manoj wrote: > Hello All, > I am trying to work on writing the following piece of (pseudo) > code in an optimal fashion: > > > # Two data frames with some data > > a = data.frame(somedata) > b = data.frame(somedata) > >

[R] Help needed understanding eval,quote,expression

2006-06-29 Thread toby_marks
I am trying to build up a quoted or character expression representing a component in a list in order to reference it indirectly. For instance, I have a list that has data I want to pull, and another list that has character vectors and/or lists of characters containing the names of the componen

Re: [R] re-direct to "more" or "less"

2006-06-29 Thread Dimitris Rizopoulos
maybe ?sink() or ?capture.output() could be useful, in this case. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax: +32/(0)16/337015 Web: http:/

[R] Building R: use the current version! {was " Running R"}

2006-06-29 Thread Martin Maechler
I'm not really answering your question, but if you install from the sources -- always a useful experience in finding out if your computer is well equipped with software -- *PLEASE* use the latest aka "current" version of R. Currently, that's 2.3.1 and not 2.3.0. A very reasonable alternative is a