[R] Easy cut paste from Excel to R?

2005-02-16 Thread Werner Wernersen
Hi! Is it possible to easily cut paste data from an Excel spreadsheet to an R edit( ) grid or to variable? It seems that R cannot handle the cell delimiters Excel hands over. Regards, Werner __ R-help@stat.math.ethz.ch mailing list

Re: [R] Easy cut paste from Excel to R?

2005-02-16 Thread Uwe Ligges
Werner Wernersen wrote: Hi! Is it possible to easily cut paste data from an Excel spreadsheet to an R edit( ) grid or to variable? It seems that R cannot handle the cell delimiters Excel hands over. Regards, Werner __ R-help@stat.math.ethz.ch

[R] real and complex vectors

2005-02-16 Thread Robin Hankin
The following caught me off-guard: R z - 1i + 1:10 R z - Re(z) R z [1] 1 2 3 4 5 6 7 8 9 10 as expected. But look: R z - 1i + 1:10 R make.real - abs(z) 1000 R z[make.real] - Re(z[make.real]) R z [1] 1+0i 2+0i 3+0i 4+0i 5+0i 6+0i 7+0i 8+0i 9+0i 10+0i R didn't make z a real

Re: Off topic -- large data sets. Was RE: [R] 64 Bit R Background Question

2005-02-16 Thread Graham Jones
In message [EMAIL PROTECTED], Prof Brian Ripley [EMAIL PROTECTED] writes But Bert's caveats apply: you have 200 problems of size 20,000 since in QDA each class's distribution is estimated separately, and a single pass will give you the sufficient statistics however large the dataset is. I

Re: [R] real and complex vectors

2005-02-16 Thread Prof Brian Ripley
On Wed, 16 Feb 2005, Robin Hankin wrote: The following caught me off-guard: R z - 1i + 1:10 R z - Re(z) R z [1] 1 2 3 4 5 6 7 8 9 10 as expected. But look: R z - 1i + 1:10 R make.real - abs(z) 1000 R z[make.real] - Re(z[make.real]) R z [1] 1+0i 2+0i 3+0i 4+0i 5+0i 6+0i 7+0i 8+0i

Re: [R] Easy cut paste from Excel to R?

2005-02-16 Thread Peter Dalgaard
Uwe Ligges [EMAIL PROTECTED] writes: Werner Wernersen wrote: Hi! Is it possible to easily cut paste data from an Excel spreadsheet to an R edit( ) grid or to variable? It seems that R cannot handle the cell delimiters Excel hands over. Regards, Werner

Re: [R] real and complex vectors

2005-02-16 Thread Uwe Ligges
Robin Hankin wrote: The following caught me off-guard: R z - 1i + 1:10 R z - Re(z) R z [1] 1 2 3 4 5 6 7 8 9 10 as expected. But look: R z - 1i + 1:10 R make.real - abs(z) 1000 R z[make.real] - Re(z[make.real]) R z [1] 1+0i 2+0i 3+0i 4+0i 5+0i 6+0i 7+0i 8+0i 9+0i 10+0i R

Re: [R] some help interpreting ANOVA results, please?

2005-02-16 Thread Christoph Scherber
Dear RenE, Can you explain a bit more how you derive your T.SPart? That´s what I think is the tricky part of your analysis. I would suggest you should try to end up with something like this: model1-aov(SR~WasSick*Time+Error(Subject/Time) model2-aov(SR~SC*Time+Error(Subject/Time) This way it

Re: [R] Easy cut paste from Excel to R?

2005-02-16 Thread Uwe Ligges
Peter Dalgaard wrote: Uwe Ligges [EMAIL PROTECTED] writes: Werner Wernersen wrote: Hi! Is it possible to easily cut paste data from an Excel spreadsheet to an R edit( ) grid or to variable? It seems that R cannot handle the cell delimiters Excel hands over. Regards, Werner

Re: [R] Easy cut paste from Excel to R?

2005-02-16 Thread Peter Dalgaard
Uwe Ligges [EMAIL PROTECTED] writes: Well, yes, some arguments twisting might be required as for my german locales / german version of Excel the following works even for empty cells and real valued entries: read.table(file(clipboard), sep=\t, dec=,) V1 V2 V3 1 1.2 NA 2.3 2

Re: [R] real and complex vectors

2005-02-16 Thread Duncan Murdoch
On Wed, 16 Feb 2005 10:00:01 +, Robin Hankin [EMAIL PROTECTED] wrote : The following caught me off-guard: R z - 1i + 1:10 R z - Re(z) R z [1] 1 2 3 4 5 6 7 8 9 10 as expected. But look: R z - 1i + 1:10 R make.real - abs(z) 1000 R z[make.real] - Re(z[make.real]) R z [1]

Re: [R] Easy cut paste from Excel to R?

2005-02-16 Thread Uwe Ligges
Peter Dalgaard wrote: Uwe Ligges [EMAIL PROTECTED] writes: Well, yes, some arguments twisting might be required as for my german locales / german version of Excel the following works even for empty cells and real valued entries: read.table(file(clipboard), sep=\t, dec=,) V1 V2 V3 1 1.2 NA

[R] R: ridge regression

2005-02-16 Thread Clark Allan
hi all a technical question for those bright statisticians. my question involves ridge regression. definition: n=sample size of a data set X is the matrix of data with , say p variables Y is the y matrix i.e the response variable Z(i,j) = ( X(i,j)- xbar(j) / [ (n-1)^0.5* std(x(j))]

[R] Repeating grey scale in graph?

2005-02-16 Thread Sander Oom
Dear R users, Could somebody tell me why the grey color ramp is repeated in this graph, eventhough the ramp values go from 0 to 1? I must be missing something obvious, but I can not see it! z - c(0.064329041,0.117243316,0.161565116,0.19923015,0.231642175,0.259835539,0.284571226,

[R] curve(x,y)?

2005-02-16 Thread solares
HI, i search for a function what plot a curve but my function f(x) have two variables, exist a funcion curve(x,y) in R. Thanks __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

RE: [R] R: ridge regression

2005-02-16 Thread Liaw, Andy
If I'm not mistaken, you only need to know that if V is the covariance matrix of a random vector X, then the covariance of the linear transformation AX + b is AVA'. Substitute betahat for X, and figure out what A is and you're set. (b is 0 in your case.) Andy From: Clark Allan hi all

[R] phi correlation

2005-02-16 Thread Nicole
Hello my big problem is, i can´t find the phi-correlation instruction in the R - programm. (correlation method= spearman, pearson, kendall, I have found) I also cant find the transform instruction which I can transform rational vector into nominal vectors (binary) Transforming into ordinaI

[R] Setting log(0) to 0

2005-02-16 Thread Terji Petersen
Hi, I'm trying to do a regression like this: wage.r = lm( log(WAGE) ~ log(EXPER) where EXPER is an integer that goes from 0 to about 50. EXPER contains some zeros, so you can't take its log, and the above regression therefore fails. I would like to make R accept log(0) as 0, is that possible?

[R] Lattice --reference line in panels does not come up

2005-02-16 Thread Luis Ridao Cruz
R-help, I am quite new to lattice. I am plotting something in which I want some reference lines. I do the foolowing : library ( lattice ) reference.line - trellis.par.get ( reference.line ) reference.line$lty - 2## not working with any of the reference.line components # reference.line$col -

Re: [R] Repeating grey scale in graph?

2005-02-16 Thread Uwe Ligges
Sander Oom wrote: Dear R users, Could somebody tell me why the grey color ramp is repeated in this graph, eventhough the ramp values go from 0 to 1? I must be missing something obvious, but I can not see it! You missed to read the ehlp page ?persp: col: the color(s) of the surface facets.

Re: [R] Repeating grey scale in graph?

2005-02-16 Thread Peter Dalgaard
Sander Oom [EMAIL PROTECTED] writes: Dear R users, Could somebody tell me why the grey color ramp is repeated in this graph, eventhough the ramp values go from 0 to 1? I must be missing something obvious, but I can not see it! z -

Re: [R] curve(x,y)?

2005-02-16 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: HI, i search for a function what plot a curve but my function f(x) have two variables, exist a funcion curve(x,y) in R. Thanks __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] R: ridge regression

2005-02-16 Thread Clark Allan
hi Andy and other r users i never gave the full picture. beta(j)= std(y)*betaridge(j)/std(x(j)) for j=1,2,...p but beta(0) = ybar- sum( i= 1 to p, betaridge(i)*xbar(j) ) note that ybar and the xbars are estimated parameters. we can split the covariance matrix into three sections namely: 1.

Re: [R] phi correlation

2005-02-16 Thread Bernd Weiss
On 16 Feb 2005 at 12:54, Nicole wrote: Hello my big problem is, i can´t find the phi-correlation instruction in the R - programm. (correlation method= spearman, pearson, kendall, I have found) See package vcd, command assoc.stats. I also cant find the transform instruction which I can

Re: [R] phi correlation

2005-02-16 Thread Uwe Ligges
Nicole wrote: Hello my big problem is, i cant find the phi-correlation instruction in the R - programm. (correlation method= spearman, pearson, kendall, I have found) I also cant find the transform instruction which I can transform rational vector into nominal vectors (binary) Transforming

RE: [R] Easy cut paste from Excel to R?

2005-02-16 Thread Nick Drew
I've had good luck with the scan() function when I want to get a few numbers from Excel into R quickly to use it as a calculator. CAVEAT: you have to have the numbers you want to copy in a column not a row in Excel. For example: In Excel your data are in a column as follows: Col A 1 2 3 Then

[R] histogram and boxplot in a same postscript

2005-02-16 Thread Cézar Freitas
Hi, all. I need plot a boxplot under a histogram like below, but some configs are troubled: - the boxplot contours the plot, even if I put bty=n, modifying the histogram plot; - I changed the configs of axis to do a 3x3 inches plot, but the result is 2 different axis. For example, the code below

Re: [R] Lattice --reference line in panels does not come up

2005-02-16 Thread Uwe Ligges
Luis Ridao Cruz wrote: R-help, I am quite new to lattice. I am plotting something in which I want some reference lines. I do the foolowing : library ( lattice ) reference.line - trellis.par.get ( reference.line ) reference.line$lty - 2## not working with any of the reference.line components #

[R] RE: Off topic -- large data sets. Experiences using R on clusters/Grids

2005-02-16 Thread Thomas Colson
Thanks for all the input. Now to go further off topic.. Does anyone have any comments regarding running 64 BIT R on cluster/grid systems? Given an (almost) unlimited amount of memory, can R hypotheticaly handle Very Large Datasets? I'm finding that even small sub sets of this data come in at 1

Re: [R] Lattice --reference line in panels does not come up

2005-02-16 Thread Luis Ridao Cruz
Thank you Uwe, It worked ! Luis Uwe Ligges [EMAIL PROTECTED] 16/02/2005 13:21:27 Luis Ridao Cruz wrote: R-help, I am quite new to lattice. I am plotting something in which I want some reference lines. I do the foolowing : library ( lattice ) reference.line - trellis.par.get (

RE: [R] Setting log(0) to 0

2005-02-16 Thread Ted Harding
On 16-Feb-05 Terji Petersen wrote: Hi, I'm trying to do a regression like this: wage.r = lm( log(WAGE) ~ log(EXPER) where EXPER is an integer that goes from 0 to about 50. EXPER contains some zeros, so you can't take its log, and the above regression therefore fails. I would like to

Re: [R] Repeating grey scale in graph?

2005-02-16 Thread Sander Oom
Thanks Peter! Of course I only have (nx-1)(ny-1) facets in a x*y plot! The help page line: ... col the color(s) of the surface facets. Transparent colours are ignored. This is recycled to the (nx-1)(ny-1) facets. ... just did not ring a bell. In fact, it is still not clear to me why it recycles

[R] Profiling R code and C code (Rprof and gprof)

2005-02-16 Thread Yongchao Ge
Hi, I have searched R mail list archive and couldn't find my answers. The R extension describes how to make use of Rprof to profile R code. gprof can be also used for the same purpose for the C codes when the C codes are written independently and provided with a main() function. I'm

[R] Passing colnames to graphics title

2005-02-16 Thread Laura Quinn
Hi, Just a quick query - if I'm creating a function to produce a number of histograms per page of output (one per column from a matrix), how can I pass the column name of the matrix into the title (or indeed to form part of the x-axis label)? TIA, Laura Laura Quinn Institute of Atmospheric

Re: [R] Lattice --reference line in panels does not come up

2005-02-16 Thread Douglas Bates
Uwe Ligges wrote: Luis Ridao Cruz wrote: R-help, I am quite new to lattice. I am plotting something in which I want some reference lines. I do the foolowing : library ( lattice ) reference.line - trellis.par.get ( reference.line ) reference.line$lty - 2## not working with any of the

[R] (no subject)

2005-02-16 Thread Jim Gustafsson
R-people I wonder if one could change a list of table with number of the form 1,200.44 , to 1200.44 Regards JG -- This e-mail and any attachment may be confidential and may also be privileged. If you are not the

[R] Informix from Mac

2005-02-16 Thread Omar Lakkis
I am using R 2.0.1 on Max OS X. The database is Informix. There is no Informix ODBC client for Mac, as far as I know, so I can't use RODBC. Other than going with SJava/JDBC, is there a way for me to connect to the database? __ R-help@stat.math.ethz.ch

Re: [R] Repeating grey scale in graph?

2005-02-16 Thread Achim Zeileis
On Wed, 16 Feb 2005 15:44:00 +0200 Sander Oom wrote: Thanks Peter! Of course I only have (nx-1)(ny-1) facets in a x*y plot! The help page line: ... col the color(s) of the surface facets. Transparent colours are ignored. This is recycled to the (nx-1)(ny-1) facets. ... just did not

Re: [R] Repeating grey scale in graph?

2005-02-16 Thread Uwe Ligges
Sander Oom wrote: Thanks Peter! Of course I only have (nx-1)(ny-1) facets in a x*y plot! The help page line: ... col the color(s) of the surface facets. Transparent colours are ignored. This is recycled to the (nx-1)(ny-1) facets. ... just did not ring a bell. In fact, it is still not clear

Re: [R] Repeating grey scale in graph?

2005-02-16 Thread Peter Dalgaard
Achim Zeileis [EMAIL PROTECTED] writes: In fact, it is still not clear to me why it recycles the ramp even though it has a surplus of colours (grey levels)! Why not just ignore the surplus colours? It does! cols is a vector of length 42 and only the first 30 are used. Try to use

Re: [R] Passing colnames to graphics title

2005-02-16 Thread Uwe Ligges
Laura Quinn wrote: Hi, Just a quick query - if I'm creating a function to produce a number of histograms per page of output (one per column from a matrix), how can I pass the column name of the matrix into the title (or indeed to form part of the x-axis label)? By extracting them using

Re: [R] Passing colnames to graphics title

2005-02-16 Thread Dimitris Rizopoulos
a simple thing to do is: mat - matrix(...) # your matrix nams - dimnames(mat)[[2]] for(j in 1:ncol(mat)) hist(mat[,j], main=nams[j]) # or hist(mat[,j], xlab=paste(..., nams[j], ...)) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public

Re: [R] Passing colnames to graphics title

2005-02-16 Thread Laura Quinn
Obviously I have been trying to use the colnames() function! However, when I try to subscript ie: for(i in 1:20){ main=paste(Site:,colnames(i),sep=) } this doesn't work! I thought that as.character(colnames(i)) or substitute(colnames(i)) might work, but to no avail... Laura Quinn Institute of

Re: [R] histogram and boxplot in a same postscript

2005-02-16 Thread Uwe Ligges
Cézar Freitas wrote: Hi, all. I need plot a boxplot under a histogram like below, but some configs are troubled: - the boxplot contours the plot, even if I put bty=n, modifying the histogram plot; You want to set axes = FALSE in boxplot() BTW: What is q[4] in your call to points()? Uwe Ligges -

Re: [R] Easy cut paste from Excel to R?

2005-02-16 Thread Gabor Grothendieck
Peter Dalgaard p.dalgaard at biostat.ku.dk writes: : : Uwe Ligges ligges at statistik.uni-dortmund.de writes: : : Well, yes, some arguments twisting might be required as for my german : locales / german version of Excel the following works even for empty : cells and real valued entries: :

Re: [R] Passing colnames to graphics title

2005-02-16 Thread Laura Quinn
Wonderful, thank you very much! Laura Quinn Institute of Atmospheric Science School of Earth and Environment University of Leeds Leeds LS2 9JT tel: +44 113 343 1596 fax: +44 113 343 6716 mail: [EMAIL PROTECTED] On Wed, 16 Feb 2005, Dimitris Rizopoulos wrote: a simple thing to do is: mat -

Re: [R] (no subject)

2005-02-16 Thread Christoph Buser
Hi Jim I'm not sure if I understand your problem correctly. Is this a solution? (li - list(a=1,b=200.44)) as.numeric(paste(unlist(li), collapse = )) Best regards, Christoph Buser -- Christoph Buser [EMAIL PROTECTED] Seminar fuer

[R] splitting items into groups according to correlations

2005-02-16 Thread Andreas Wolf
hi, i'm looking for a smart way of distributing items to different groups according to their correlation(s). the correlation of items within one group should be minimal, whereas (canonical) correlation between the blocks should be maximal. example: you have 20 items, which are to be split into 4

Re: [R] Repeating grey scale in graph?

2005-02-16 Thread Duncan Murdoch
On Wed, 16 Feb 2005 15:44:00 +0200, Sander Oom [EMAIL PROTECTED] wrote : Thanks Peter! Of course I only have (nx-1)(ny-1) facets in a x*y plot! The help page line: ... colthe color(s) of the surface facets. Transparent colours are ignored. This is recycled to the (nx-1)(ny-1) facets. ...

[R] glmm with negative binomial

2005-02-16 Thread Brian Aukema
Hello, At present, can generalized linear mixed models with negative binomial distribution and estimating the shape parameter be fit using R? I am aware of glm.nb but am wondering about incorporation of mixed effects. Thanks in advance, Brian Aukema

Re: [R] (no subject)

2005-02-16 Thread Petr Pikal
Hi Jim Something like x-1,200.44 as.numeric(sub(,, , x)) [1] 1200.44 Petr On 16 Feb 2005 at 15:08, Jim Gustafsson wrote: R-people I wonder if one could change a list of table with number of the form 1,200.44 , to 1200.44 Regards JG

Re: [R] (no subject)

2005-02-16 Thread Peter Dalgaard
Jim Gustafsson [EMAIL PROTECTED] writes: R-people I wonder if one could change a list of table with number of the form 1,200.44 , to 1200.44 Regards JG On input, I assume? Read as character variable, get rid of the comma(s) using (g)sub, then use as.numeric. -- O__ Peter

Re: [R] Passing colnames to graphics title

2005-02-16 Thread Uwe Ligges
Laura Quinn wrote: Obviously I have been trying to use the colnames() function! However, when I try to subscript ie: for(i in 1:20){ main=paste(Site:,colnames(i),sep=) } Example (which you should have provided): # Generate an example-matrix: X - matrix(1:9, 3) colnames(X) - letters[1:3] # now

Re: [R] Passing colnames to graphics title

2005-02-16 Thread Uwe Ligges
Uwe Ligges wrote: Laura Quinn wrote: Obviously I have been trying to use the colnames() function! However, when I try to subscript ie: for(i in 1:20){ main=paste(Site:,colnames(i),sep=) } BTW: colnames(i) is the same as colnames(1) in the first iteration of your loop. What do you expect

[R] Rmpi - cluster with no name

2005-02-16 Thread balbo
Hello everybody, thanks for help. I'm having this problem using the package Rmpi. I run R with mpi and then I load the library 'Rmpi' and 'snow'. But when I try to create the cluster: mycluster - makeCluster(2) I get this error Error in makeMPIcluster(spec, ...) : a cluster already exists 1

Re: [R] Passing colnames to graphics title

2005-02-16 Thread Sundar Dorai-Raj
Laura Quinn wrote: Obviously I have been trying to use the colnames() function! However, when I try to subscript ie: for(i in 1:20){ main=paste(Site:,colnames(i),sep=) } this doesn't work! I thought that as.character(colnames(i)) or substitute(colnames(i)) might work, but to no avail... Laura, You

Re: [R] Passing colnames to graphics title

2005-02-16 Thread Jan T. Kim
On Wed, Feb 16, 2005 at 02:46:51PM +, Laura Quinn wrote: Obviously I have been trying to use the colnames() function! However, when I try to subscript ie: for(i in 1:20){ main=paste(Site:,colnames(i),sep=) ^^^ it looks to me that this should be something

[R] Multiple instances of R shell in Mac OS X 10.3?

2005-02-16 Thread Ken Termiso
Wondering if there's a way to do this. I'm not referring to running Rterm from OSX terminal, but actually running multiple instances of the R command shell within the OS X GUI... I have R v2.0.1, OS X 10.3.8. Thanks in advance, Ken __

RE: [R] Passing colnames to graphics title

2005-02-16 Thread Austin, Matt
If i is 1:20, there are no column names. Make sure you are indexing the names from your your dataframe. xx - data.frame(a=c(1:10), b = letters[1:10]) colnames(xx) [1] a b for(i in 1:2) print(colnames(xx)[i]) [1] a [1] b for(i in colnames(xx)) print(i) [1] a [1] b Matt Austin Statistician

Re: [R] Repeating grey scale in graph?

2005-02-16 Thread Sander Oom
Aaaah...the inner workings of R! Now I also see why the colours are not only repeated, but also 'wrongly' allocated to the facets! Very clear example! Indeed a warning or error would have been more helpful! Cheers, Sander. PS: I hope that after all this, I can still convince the creator of the

Re: [R] (no subject)

2005-02-16 Thread james . holtman
use 'gsub' x - c('1,200.44', '23,345.66') gsub(',','',x) [1] 1200.44 23345.66 as.numeric(gsub(',','',x)) [1] 1200.44 23345.66 __ James HoltmanWhat is the problem you are trying to solve? Executive Technical Consultant --

RE: [R] Passing colnames to graphics title

2005-02-16 Thread John Fox
Dear Laura, It doesn't make sense to call colnames() with the loop index; you could do something like (for the matrix or data frame X): par(mfrow=c(1, ncol(X))) names - colnames(X) for (i in seq(along=names)) hist(X[,i], main=, xlab=paste(Site:, names[i])) I hope this helps, John

[R] Sampling given a table of percentages?

2005-02-16 Thread Ben Hyde
I have a vector V. sum(V) = 100, i.e. it's percentages. length(V) is large. I wish to generate samples (with replacement is fine), integers, in the range 1:length(V) who's distribution is driven by the distribution implied by the percentages in V.V is unsorted, but that could change.

[R] problem with da.mix

2005-02-16 Thread Stephanie . Tomczak
Hello, We use the mix package and we have a problem with the DA function. We aren't sure, but it's maybbe a memory problem. We have done: Ent--read.table(C:/.../File.txt) attach(Ent) Ent V1 V2 V3 V4 ... V16 V17 11 1 2 6 18 18 21 1 1 NA 14 17 3

[R] panel/prepanel for polar plots ala xYplot

2005-02-16 Thread Randall Pruim
First a bit of background: After doing a search for a flexible polar plot function and coming up empty, I have begun writing one myself. Since I am new to writing mid-level graphics routines, this has required some learning about lattice, grid and related things. I am to the point where I

Re: [R] Easy cut paste from Excel to R?

2005-02-16 Thread Werner Wernersen
Thank you all very much for the answers! The read.table / read.delim2 commands are exactly what I was looking for to get a couple of numbers or a little matrix quickly into R without creating an extra text file every time. And it works the other way around as well: write.table(x,

[R] about library(boot)

2005-02-16 Thread Francisca xuan
Dear Sir/Madam: I try to use the library boot to bootstrap the median of a data set. Can anybody tell me why this doesn't work? Thanks. library(boot) x=rnorm(100) boot(x,median,999) I know I can write a simple code for bootstrapping myself. but I am so curious to know why the above code does

Re: [R] glmm with negative binomial

2005-02-16 Thread Prof Brian Ripley
On Wed, 16 Feb 2005, Brian Aukema wrote: At present, can generalized linear mixed models with negative binomial distribution and estimating the shape parameter be fit using R? I am aware of glm.nb but am wondering about incorporation of mixed effects. I am not aware of anyone who knows how to

[R] (no subject)

2005-02-16 Thread Jeff Knoblett
Please remove me from the mailing list! __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] Setting log(0) to 0

2005-02-16 Thread Terji Petersen
Thank you both of you, Kenneth and Ted:-). Log1p(x) is not what I asked for, but it is better:-D And Ted, thanks for your thoughts on funcional form. I'm just starting out with R, and feel like I've barely scratched the surface of the program. I have never in my life done a non-linear

Re: [R] Passing colnames to graphics title

2005-02-16 Thread Adaikalavan Ramasamy
Either set the 'main' or 'xlab' in the hist(). See help(par) for more information on graphical arguments or help(hist). mat - matrix( rnorm(1000), nc=5 ) colnames(mat) - LETTERS[1:ncol(mat)] for( i in 1:ncol(mat) ){ hist( mat[ ,i], main=paste( Histogram of data from column ,

[R] Re: histogram ... postscript - width of lines / plot margins

2005-02-16 Thread Cézar Freitas
Thanks. You answer works well. But this time I get 2 problems: - because the region of plot is shorter then the default, the width of lines of plots is larger (see the two attached pictures .ps) and the lwd command don't deals with it; - the plot region contains big margins (the picture has 3x3

RE: [R] Sampling given a table of percentages?

2005-02-16 Thread Liaw, Andy
Wouldn't sample(length(V), prob=V) do? Andy From: Ben Hyde I have a vector V. sum(V) = 100, i.e. it's percentages. length(V) is large. I wish to generate samples (with replacement is fine), integers, in the range 1:length(V) who's distribution is driven by the distribution

[R] problem with se.contrast()

2005-02-16 Thread Jamie Jarabek
I am having trouble getting standard errors for contrasts using se.contrast() in what appears to be a simple case to me. The following test example illustrates my problem: Lab - factor(rep(c(1,2,3),each=12)) Material - factor(rep(c(A,B,C,D),each=3,times=3)) Measurement -

[R] running out of memory

2005-02-16 Thread Stephen Choularton
Hi I am trying to do a large glm and running into this message. Error: cannot allocate vector of size 3725426 Kb In addition: Warning message: Reached total allocation of 494Mb: see help(memory.size) Am I simply out of memory (I only have .5 gig)? Is there something I can do? Stephen

Re: [R] panel/prepanel for polar plots ala xYplot

2005-02-16 Thread Deepayan Sarkar
On Wednesday 16 February 2005 11:11, Randall Pruim wrote: First a bit of background: After doing a search for a flexible polar plot function and coming up empty, I have begun writing one myself. Since I am new to writing mid-level graphics routines, this has required some learning about

[R] intersection or == of date vectors

2005-02-16 Thread Omar Lakkis
I have a vector of unique dates v1, and a vector of unique dates v2 (the vectors are of different lengths). How do I find out the count of elements that matches between the two vectors? __ R-help@stat.math.ethz.ch mailing list

RE: [R] problem with da.mix

2005-02-16 Thread Ted Harding
On 16-Feb-05 [EMAIL PROTECTED] wrote: We use the mix package and we have a problem with the DA function. We aren't sure, but it's maybbe a memory problem. We have done: Ent--read.table(C:/.../File.txt) attach(Ent) Ent V1 V2 V3 V4 ... V16 V17 11 1 2 6 18 18 2

RE: [R] Sampling given a table of percentages?

2005-02-16 Thread Adaikalavan Ramasamy
yes but add 'replace=TRUE' into that statement to sample with replacement. On Wed, 2005-02-16 at 14:00 -0500, Liaw, Andy wrote: Wouldn't sample(length(V), prob=V) do? Andy From: Ben Hyde I have a vector V. sum(V) = 100, i.e. it's percentages. length(V) is large. I wish to

Re: [R] (no subject)

2005-02-16 Thread Peter Dalgaard
Jeff Knoblett [EMAIL PROTECTED] writes: Please remove me from the mailing list! Well, the list manager *might* remove you, *when* he gets back from his holiday, *if* he notices it and is in a good mood. If you want a quicker reaction, please use the web interface as indicated in the footer:

RE: [R] intersection or == of date vectors

2005-02-16 Thread Berton Gunter
length(intersect(v1,v2)) -- 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 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf

[R] Positive log-likelihood in lme

2005-02-16 Thread Peter Alspach
Kia ora I'm a using lme (from nlme package) with data similar to the Orthodont dataset and am getting positive log-likelihoods (100). This seems usual and I wondered if someone could offer a possible explanation. I can supply a sample dataset if requested, but I feel almost certain that this

[R] scaling axes when plotting multiple data sets

2005-02-16 Thread Benjamin M. Osborne
1) When adding additional data sets to a plot using plot followed by lines, is there a way to automate the scaling of the axes to allow for all data sets to fit within the plot area? 2) I attempted to solve this by setting xlim=c(min(c(data1,data2,data3)),max(c(data1,data2,data3))) however,

Re: [R] about library(boot)

2005-02-16 Thread John Fox
Dear Francisca, On Wed, 16 Feb 2005 11:28:24 -0500 Francisca xuan [EMAIL PROTECTED] wrote: Dear Sir/Madam: I try to use the library boot to bootstrap the median of a data set. Can anybody tell me why this doesn't work? Thanks. library(boot) x=rnorm(100) boot(x,median,999) I know I

Re: [R] Positive log-likelihood in lme

2005-02-16 Thread Spencer Graves
The likelihood is the probability density function, which can be greater than 1 for continuous distributions with a fairly narrow spread. For discrete distributions, the density never exceeds 1, in which case the log(likelihood) would always be negative(*). hope this helps.

Re: [R] Positive log-likelihood in lme

2005-02-16 Thread Ingmar Visser
Hi Peter, Why do you think positive log-likelihoods are unusual? consider: dnorm(1,1,0.1) [1] 3.989423 log(dnorm(1,1,0.1)) [1] 1.383647 Any log-likelihood would be a sum of such terms. Hth, ingmar On 2/16/05 11:02 PM, Peter Alspach [EMAIL PROTECTED] wrote: Kia ora I'm a using lme (from

Re: [R] scaling axes when plotting multiple data sets

2005-02-16 Thread John Fox
Dear Ben, On Wed, 16 Feb 2005 17:04:13 -0500 Benjamin M. Osborne [EMAIL PROTECTED] wrote: 1) When adding additional data sets to a plot using plot followed by lines, is there a way to automate the scaling of the axes to allow for all data sets to fit within the plot area? Not, to my

Re: [R] scaling axes when plotting multiple data sets

2005-02-16 Thread Spencer Graves
I just did ?min and found an argument na.rm, which when TRUE causes min to ignore NAs. Also, See Also for ?min mentions range, which returns a 2-vector consisting of both min and max. The function range also accepts the na.rm argument. AND the documentation for range includes a simple

[R] Unable to create histograms

2005-02-16 Thread Radha Chebolu
Hi, could someone pelase help me with this? My data set's name is db1(say) and one of the variables is var1. I gave the command: hist(db1$var1). The values of Var1 are numbers. I got an error which says: 'x' must be numeric. Sometimes it works for other datasets and it's not working for this

Re: [R] Unable to create histograms

2005-02-16 Thread Spencer Graves
Are you sure it's numeric? Have you looked at the following: class(db1$var1) Do you mean hist(db1$Var1)? R is case sensitive. Importing data from an Excel spreadsheet was discussed earlier today on this list. My favorite, contributed by Gabor Grothendieck, was to

Re: [R] (no subject)

2005-02-16 Thread Ted Harding
On 16-Feb-05 Peter Dalgaard wrote: Well, the list manager *might* remove you, *when* he gets back from his holiday, *if* he notices it and is in a good mood. If you want a quicker reaction, please use the web interface as indicated in the footer: Error: syntax error (: use *and* :) Ted.

Re: [R] scaling axes when plotting multiple data sets

2005-02-16 Thread Gabor Grothendieck
Benjamin M. Osborne Benjamin.Osborne at uvm.edu writes: : : 1) When adding additional data sets to a plot using plot followed by lines, : is there a way to automate the scaling of the axes to allow for all data sets : to fit within the plot area? : : 2) I attempted to solve this by setting :

[R] Multiple Fstats/breakpoints test using Panel data

2005-02-16 Thread Yen H., Tong
Hi, I have recently use the strucchange package in R with a single time series observation. I found it extremely useful in the testing of change points. Now, I am thinking of using the strucchange package with panel data (about 500 firms, with 73 monthly time series observations each). For

[R] Adding new column to data frame and filling some rows of it - classes

2005-02-16 Thread Gorjanc Gregor
Hello! Few days ago I was asking on a list about adding a column and filling it in some rows. I was satisfied, but one thing raised my attention. I will show itthrough an example: tmp - data.frame(y1=1:4, f1=factor(c(A, B, C, D))) f2 - factor(c(Z, Y)) # I would like to add f2 to tmp and I know

Re: [R] Adding new column to data frame and filling some rows of it - classes

2005-02-16 Thread Gabor Grothendieck
Gorjanc Gregor Gregor.Gorjanc at bfro.uni-lj.si writes: : Few days ago I was asking on a list about adding a column and filling : it in some rows. I was satisfied, but one thing raised my attention. I : will show itthrough an example: : : tmp - data.frame(y1=1:4, f1=factor(c(A, B, C, D))) : f2

[R] socket problems (maybe bugs?)

2005-02-16 Thread Christian Lederer
Dear R Gurus, for some purpose i have to use a socket connection, where i have to read and write both text and binary data (each binary data package will be preceeded by a header line). When experimenting, i encountered some problems (with R-2.0.1 under different Linuxes (SuSE and Gentoo)).

[R] How to upgrade library from R 1.9.1 to R 2.0.1

2005-02-16 Thread YiYao_Jiang
Dear All: I have a library for R 1.9.1, it is very easy to setup a library in R 1.9.1. For example: I want to setup a library test for R1.9.1. 1. Create a folder test in the direct X:\ R\ rw1091\ library \. 2. Create a file DESCRIPTION in the direct X:\ R\ rw1091\

Re: [R] How to upgrade library from R 1.9.1 to R 2.0.1

2005-02-16 Thread Gabor Grothendieck
YiYao_Jiang YiYao_Jiang at smics.com writes: : : Dear All: : : I have a library for R 1.9.1, it is very easy to setup a library in R 1.9.1. : For example: : I want to setup a library test for R1.9.1. : 1. Create a folder test in the direct X:\ R\ rw1091\ library \. : 2.

[R] Error in eval(expr, envir, enclos) : numeric envir arg not of length one

2005-02-16 Thread Stephen Choularton
I am working with a largish dataset of 25k lines and I am now tying to use predict. pred = predict(cuDataGlmModel, length + meanPitch + minimumPitch + maximumPitch + meanF1 + meanF2 + meanF3 + meanF4 + meanF5 + ratioF1ToF2 + rationF3ToF1 + jitter + shimmer + percentUnvoicedFrames +

Re: [R] running out of memory

2005-02-16 Thread Uwe Ligges
Stephen Choularton wrote: Hi I am trying to do a large glm and running into this message. Error: cannot allocate vector of size 3725426 Kb In addition: Warning message: Reached total allocation of 494Mb: see help(memory.size) Am I simply out of memory (I only have .5 gig)? Is there

  1   2   >