Re: [R] Transcript of "Conservative ANOVA tables"

2006-10-09 Thread Marc Schwartz (via MN)
On Mon, 2006-10-09 at 15:43 +, Gregor Gorjanc wrote: > Dieter Menne menne-biomed.de> writes: > > > > > Dear friends of lmer, > > > > http://wiki.r-project.org/rwiki/doku.php?id=guides:lmer-tests > > > > I have put a transcript of the long thread on lmer/lme4 statistical test > > into the W

Re: [R] How can I delete components in a column ?

2006-10-09 Thread Marc Schwartz (via MN)
On Mon, 2006-10-09 at 17:15 +0200, Yen Ngo wrote: > Hi all R-helpers, > > i am a new R-user and have problem with deleting some components in a > column. I have a dataset like > > Name Idx >empty 2 >empty 3 > anone2 > bnone

Re: [R] lines at margin?

2006-10-09 Thread Marc Schwartz (via MN)
On Mon, 2006-10-09 at 10:56 -0400, Mike Wolfgang wrote: > Hi list, > > I want to add some lines at margin area of one figure. mtext could add text > to these margins, can I add lines with different lty parameters? Thanks, > > mike You can do it, but it will take some fiddling to get the coordina

Re: [R] is it possible to fill with a color or transparency gradient?

2006-10-06 Thread Marc Schwartz (via MN)
On Fri, 2006-10-06 at 16:15 -0400, Eric Harley wrote: > Hi all, > > Is there a way to fill a rectangle or polygon with a color and/or > transparency gradient? This would be extremely useful for me in terms > of adding some additional information to some plots I'm making, > especially if I could d

Re: [R] Stopping ctrl-\ from qutting R

2006-10-06 Thread Marc Schwartz (via MN)
On Fri, 2006-10-06 at 14:46 -0400, Martin C. Martin wrote: > Hi, > > In the Linux (FC3) version of R, ctrl-\ quits R. This wouldn't be so > bad, but on my keyboard, it's right next to ctrl-p and I tend to hit it > by accident. > > Is there any way to turn that off? Open your favorite terminal

Re: [R] lmer output

2006-10-06 Thread Marc Schwartz (via MN)
On Fri, 2006-10-06 at 17:05 +0100, Mike Ford wrote: > When I do lmer models I only get Estimate, Standard Error and t value in > the output for the fixed effects. > > Is there a way I get degrees of freedom and p values as well? > > I'm a very new to R, so sorry if this a stupid question. > > T

Re: [R] Barplot

2006-10-03 Thread Marc Schwartz (via MN)
te density in the code but it tells "Error in > xy.coords(x, y) : 'x' and 'y' lengths differ" > I appreciate any comment about these questions > > Thanks, > Mohsen > > > On 10/2/06, Marc Schwartz (via MN) <[EMAIL PROTECTED]> wrote: > >

Re: [R] how ot replace the diagonal of a matrix

2006-10-03 Thread Marc Schwartz (via MN)
On Tue, 2006-10-03 at 17:03 -0400, Duncan Murdoch wrote: > On 10/3/2006 4:59 PM, roger bos wrote: > > Dear useRs, > > > > Trying to replace the diagonal of a matrix is not working for me. I > > want a matrix with .6 on the diag and .4 elsewhere. The following > > code looks like it should work--

Re: [R] X-axis labels in histograms drawn by the "truehist" function

2006-10-02 Thread Marc Schwartz (via MN)
On Mon, 2006-10-02 at 14:58 -0400, Ravi Varadhan wrote: > > Hi, > > > > I had sent this email last week, but received no reply. So, I am resending > it - please excuse me for the redundant email. > > > > I have a simple problem that I would appreciate getting some tips. I am > using the

Re: [R] Barplot

2006-10-02 Thread Marc Schwartz (via MN)
On Mon, 2006-10-02 at 11:14 -0400, Mohsen Jafarikia wrote: > Hello, > > I have used the following data to draw my barplot: > > BL LRQ > > 36.351.00 1.92 > 36.914.00 0.00 > 25.706.00 0.00 > 34.383.00 1.92 > 05.320.50 0.00 > > BL<-c(36.35, 36.91, 25.70,

Re: [R] index vector

2006-09-29 Thread Marc Schwartz (via MN)
On Fri, 2006-09-29 at 16:13 -0400, bertrand toupin wrote: > Hi! 1st time I'm posting here. I'm beginning to learn R and I've > encountered a problem that I'm unable to solve so far. > > I have a 20 000 x 5 matrix. In the 5th column, I have elevation. > Missing value are actually put to -9.

Re: [R] a decimal aligned column

2006-09-28 Thread Marc Schwartz (via MN)
On Thu, 2006-09-28 at 12:31 -0700, BBands wrote: > Hello, > > For numbers in the range 100 to 100,000,000 I'd like to decimal align > a right-justified comma-delineated column of numbers, but I haven't > been able to work out the proper format statement. format(num, > justify=right, width=15, big.

Re: [R] help on plots

2006-09-28 Thread Marc Schwartz (via MN)
On Thu, 2006-09-28 at 23:55 +0800, zhijie zhang wrote: > Dear friends, > I met a problem on plotting. > My dataset is : > yearMHBC LHBC MHRC LURC > 1993 11.75 4.50 0.43 0.46 > 19947.25 1.25 0.35 0.51 > 19958.67 2.17 0.54 0.44 > 1996 2.67 1.33 0.78 0.47 > 199

Re: [R] Evaluation of defaults in functions

2006-09-28 Thread Marc Schwartz (via MN)
On Thu, 2006-09-28 at 21:49 +0200, Ulrich Keller wrote: > Hello, > > and sorry if this is already explained somewhere. I couldn't find anything. > > R (2.3.1, Windows) seems to perform some kind of lazy evaluation when > evaluating defaults in function calls that, at least for me, leads to > un

Re: [R] recode problem - unexplained values

2006-09-28 Thread Marc Schwartz (via MN)
On Thu, 2006-09-28 at 12:27 +1000, [EMAIL PROTECTED] wrote: > I am hoping for some advice regarding the difficulties I have been having > recoding variables which are contained in a csv file. Table 1 (below) > shows there are two types of blanks - as reported in the first two > columns. I am usin

Re: [R] paste? 'cmd /c "c:\\pheno\\whap --file c:\\pheno\\smri --alt 1"'

2006-09-25 Thread Marc Schwartz (via MN)
On Mon, 2006-09-25 at 18:58 +0200, Boks, M.P.M. wrote: > Dear R users, > > This command works (calling a programm -called whap- with file specifiers > etc.): > > >system('cmd /c "c:\\pheno\\whap --file c:\\pheno\\smri --alt 1 --perm 500"', > >intern=TRUE) > > Now I need to call it from a lo

Re: [R] Can't mix high level and low level plot functions.

2006-09-25 Thread Marc Schwartz (via MN)
On Mon, 2006-09-25 at 19:56 +0200, Lothar Botelho-Machado wrote: > Hey R-Comunity, > > > I'd like to print out an histogram of some experimental data and add a > smooth curve of a normal distribution with an ideally generated > population having the same mean and standard deviation like the > exp

Re: [R] Splitting a character variable into a numeric one and a character one?

2006-09-25 Thread Marc Schwartz (via MN)
On Mon, 2006-09-25 at 11:04 -0500, Frank Duan wrote: > Hi All, > > I have a data with a variable like this: > > Column 1 > > "123abc" > "12cd34" > "1e23" > ... > > Now I want to do an operation that can split it into two variables: > > Column 1Column 2 Column 3 > > "123abc"

Re: [R] Splitting a character variable into a numeric one and a character one?

2006-09-25 Thread Marc Schwartz (via MN)
On Mon, 2006-09-25 at 11:30 -0500, Marc Schwartz (via MN) wrote: > On Mon, 2006-09-25 at 11:04 -0500, Frank Duan wrote: > > Hi All, > > > > I have a data with a variable like this: > > > > Column 1 > > > > "123abc" > > "12cd34&q

Re: [R] proj4R library will not install

2006-09-22 Thread Marc Schwartz (via MN)
On Fri, 2006-09-22 at 17:16 -0400, Philip Bermingham wrote: > I'm hoping someone can help me. I have downloaded the proj4R.zip and > under my version of R (2.3.1) I install the package from local zip > file. This worked great. I then type library(proj4R) to load the > library and I get the error:

Re: [R] inequality with NA

2006-09-22 Thread Marc Schwartz (via MN)
On Fri, 2006-09-22 at 20:16 +0200, Mag. Ferri Leberl wrote: > Dear everybody! > take a<-c(5,3,NA,6). > > if(a[1]!=NA){b<-7} > if(a[3]!=5){b<-7} > if(a[3]!=NA){b<-7} > if(a[3]==NA){b<-7} > > will alltogeather return > > Fehler in if (a[1] != NA) { : Fehlender Wert, wo TRUE/FALSE nötig ist > > (o

Re: [R] extract data from lm object and then use again?

2006-09-22 Thread Marc Schwartz (via MN)
On Fri, 2006-09-22 at 10:45 -0400, Mike Wolfgang wrote: > Hi list, > > I want to write a general function so that it would take an lm object, > extract its data element, then use the data at another R function (eg, glm). > I searched R-help list, and found this would do the trick of the first part

Re: [R] [ROracle] error loading (undefined symbol: sqlclu)

2006-09-20 Thread Marc Schwartz (via MN)
On Wed, 2006-09-20 at 15:15 -0400, Mathieu Drapeau wrote: > I have this error when I load the library ROracle: > > library(ROracle) > Loading required package: DBI > Error in dyn.load(x, as.logical(local), as.logical(now)) : > unable to load shared library > '/usr/local/lib/R/site-library/R

Re: [R] [Rd] Sweave processes \Sexpr in commented LaTeX source (2.3.1patched and 2.4.0)

2006-09-20 Thread Marc Schwartz (via MN)
On Wed, 2006-09-20 at 09:09 +0200, Antonio, Fabio Di Narzo wrote: > Hi. > > 2006/9/20, Marc Schwartz <[EMAIL PROTECTED]>: > > Hi all, > > > > On FC5, using: > > > > Version 2.3.1 Patched (2006-08-06 r38829) > > > > and today's > > > > R version 2.4.0 alpha (2006-09-19 r39397) > > > > with the

Re: [R] Beginners manual for emacs and ess

2006-09-20 Thread Marc Schwartz (via MN)
On Wed, 2006-09-20 at 17:03 +0200, Rainer M Krug wrote: > Hi > > I heard so much about Emacs and ESS that I decided to try it out - but I > am stuck at the beginning. > > Is there anywhere a beginners manual for Emacs & ESS to be used with R? > even M-x S tells me it can't start S-Plus - obvi

Re: [R] R CMD check fails at package dependencies check on Fedora Core 5, works on other systems

2006-09-20 Thread Marc Schwartz (via MN)
On Wed, 2006-09-20 at 13:20 +0200, Kurt Hornik wrote: > >>>>> Marc Schwartz (via MN) writes: > > > On Tue, 2006-09-19 at 22:16 +1000, Robert King wrote: > >> Here is another thing that might help work out what is happening. If I > >> use --no-inst

Re: [R] R CMD check fails at package dependencies check on Fedora Core 5, works on other systems

2006-09-19 Thread Marc Schwartz (via MN)
On Tue, 2006-09-19 at 22:16 +1000, Robert King wrote: > Here is another thing that might help work out what is happening. If I > use --no-install, ade4 actually fails as well, in the same way as zipfR. > > [Desktop]$ R CMD check --no-install ade4 > * checking for working latex ... OK > * u

Re: [R] acos(0.5) == pi/3 FALSE

2006-09-18 Thread Marc Schwartz (via MN)
On Mon, 2006-09-18 at 19:31 +0200, Iñaki Murillo Arcos wrote: > Hello, > > I don't know if the result of > > acos(0.5) == pi/3 > > is a bug or not. It looks strange to me. > >Inaki Murillo Seems reasonable to me: > acos(0.5) == pi/3 [1] FALSE > print(acos(0.5), 20) [1] 1.047197551196

Re: [R] group bunch of lines in a data.frame, an additional requirement

2006-09-13 Thread Marc Schwartz (via MN)
Try something like this: # Initial data frame > DF V1 V2 V3 V4 1 A 1.0 200 ID1 2 A 3.0 800 ID1 3 A 2.0 200 ID1 4 B 0.5 20 ID2 5 B 0.9 50 ID2 6 C 5.0 70 ID1 # Now do the aggregation to get the means DF.1 <- aggregate(DF[, 2:3], list(V1 = DF$V1), mean) > DF.1 V1 V2 V3 1 A 2.0

Re: [R] coerce matrix to number

2006-09-12 Thread Marc Schwartz (via MN)
On Tue, 2006-09-12 at 18:42 +0200, Simone Gabbriellini wrote: > Dear List, > > how can I coerce a matrix like this > > [,1] [,2] [,3] [,4] [,5] [,6] > [1,] "0" "1" "1" "0" "0" "0" > [2,] "1" "0" "1" "0" "0" "0" > [3,] "1" "1" "0" "0" "0" "0" > [4,] "0" "0" "0" "0" "1" "0

Re: [R] [OT] Important stat dates

2006-09-07 Thread Marc Schwartz (via MN)
On Thu, 2006-09-07 at 11:57 -0500, Erin Hodgess wrote: > Dear R People: > > Way Off Topic: > > Is anyone aware of a website that contains important dates > in statistics history, please? > > Maybe a sort of "This Day in Statistics", please? > > I thought that my students might get a kick out of

Re: [R] barplot: different colors for the bar and the strips

2006-09-07 Thread Marc Schwartz (via MN)
On Thu, 2006-09-07 at 12:14 -0500, Hao Chen wrote: > Hello Marc Schwartz > > On Thu, Sep 07, 2006 at 07:54:05AM -0500, Marc Schwartz wrote: > > On Thu, 2006-09-07 at 06:18 -0500, Hao Chen wrote: > > > Hi, > > > > > > I am using barplot and would like to know if it is possible to have bars > > > f

Re: [R] subset by two variables

2006-08-29 Thread Marc Schwartz (via MN)
On Tue, 2006-08-29 at 13:05 -0700, Dean Sonneborn wrote: > I'm using this syntax to create data subsets for plots: > subset=source=="Both". Now I would like to create a subset defined by > two different variables like this: subset=source=="Both" > subset=site=="home" but this syntax is not cor

Re: [R] generating an expression for a formula automatically

2006-08-24 Thread Marc Schwartz (via MN)
On Thu, 2006-08-24 at 14:01 -0700, Maria Montez wrote: > Hi! > > I would like to be able to create formulas automatically. For example, I > want to be able to create a function that takes on two values: resp and > x, and then creates the proper formula to regress resp on x. > > My code: > > fi

Re: [R] installing the x86_64 R Binary on Fedora Core 5

2006-08-24 Thread Marc Schwartz (via MN)
Roger, The Windows packages will not run on Linux. You will need to install them using the Linux versions (.tar.gz files) of the CRAN packages. You can copy them from a CRAN mirror to your USB drive and then install them locally using R CMD INSTALL PackageName.tar.gz This will again need

Re: [R] installing the x86_64 R Binary on Fedora Core 5

2006-08-24 Thread Marc Schwartz (via MN)
On Thu, 2006-08-24 at 10:53 -0400, roger bos wrote: > I am looking for help install the x86_64 R Binary onto my FC5 machine. At > the risk of subjecting myself to tons of criticism, I must confess that I > don't know anything about Linux and I have never compiled R from source. > Therefore, I choo

Re: [R] Escaping " ' " character

2006-08-22 Thread Marc Schwartz (via MN)
On Tue, 2006-08-22 at 07:32 -0700, Srinivas Iyyer wrote: > Dear marc: thank you for your tip. > > > > cat(x.new, "\n") > > 3\',5\'-cyclic-nucleotide phosphodiesterase activity > > > > here cat is printing on screen. > > how can I direct the output to an object. > > I cannot do: > > y <- ca

Re: [R] Escaping " ' " character

2006-08-21 Thread Marc Schwartz (via MN)
On Mon, 2006-08-21 at 13:43 -0700, Srinivas Iyyer wrote: > Dear all: > > I have a character object x with ' (single-quote) > character. > > x <- c('"hydrolase activity","actin > binding","3',5'-cyclic-nucleotide phosphodiesterase > activity") > > I want to write a function that will identify ' a

Re: [R] list of lists to a data.frame

2006-08-18 Thread Marc Schwartz (via MN)
On Fri, 2006-08-18 at 16:44 -0400, Rajarshi Guha wrote: > Hi, I have a situation where I have a list of lists. Each list can > contain elements of different types (but each one will be a scalar) say > of double, integer or character. > > However the elements of each list are always in the same ord

Re: [R] apply least angle regression to generalized linear models

2006-08-18 Thread Marc Schwartz (via MN)
Andy, Upon further review of the documentation for lars, you are correct. Thanks for the pointer to the work by Tim et al. Regards, Marc On Fri, 2006-08-18 at 12:48 -0400, Liaw, Andy wrote: > I believe `lars' does not currently fit glms. For that you'll probably need > to look at `glar', at:

Re: [R] apply least angle regression to generalized linear models

2006-08-18 Thread Marc Schwartz (via MN)
On Fri, 2006-08-18 at 11:17 -0400, Mike Wolfgang wrote: > Hello list, > > I've been searching around trying to find whether somebody has written such > a package of least angle regression on generalized linear models, like what > Lasso2 package does. The extension to generalized linear models is b

Re: [R] as.data.frame(cbind()) transforming numeric to factor?

2006-08-18 Thread Marc Schwartz (via MN)
On Fri, 2006-08-18 at 10:41 -0400, Tom Boonen wrote: > Dear List, > > why does as.data.frame(cbind()) transform numeric variables to > factors, once one of the other variablesused is a character vector? > > # > x.1 <- rnorm(10) > x.2 <- c(rep("Test",10)) > Foo <- as.data.frame(cbind(x.1)) > is.fa

Re: [R] Boxplot Help: Re-ordering the x-axis

2006-08-17 Thread Marc Schwartz (via MN)
On Thu, 2006-08-17 at 11:46 -0700, Pamela Allen wrote: > I am having a problem using boxlpot with my data. I have my data arranged > in a data table, and two of my columns are "mass" and "month". I am trying > to plot the mass of my study animals by month, thus I would like to have it > in the or

Re: [R] read.csv issue

2006-08-16 Thread Marc Schwartz (via MN)
On Wed, 2006-08-16 at 14:43 -0400, Doran, Harold wrote: > I'm trying to read in some data from a .csv format and have come across > the following issue. Here is a simple example for replication > > # A sample .csv format > schid,sch_name > 331-802-7081,School One > 464-551-7357,School Two > 388-51

Re: [R] separate row averages for different parts of an array

2006-08-16 Thread Marc Schwartz (via MN)
On Wed, 2006-08-16 at 11:36 -0600, Spencer Jones wrote: > I have an array with 44800 columns and 24 rows I would like to compute the > row average for the array 100 columns at a time, so I would like to end up > with an array of 24 rows x 448 columns. I have tried using apply(dataset, 1, > function

Re: [R] How to show classes of all columns of a data frame?

2006-08-15 Thread Marc Schwartz (via MN)
On Tue, 2006-08-15 at 13:10 -0400, T Mu wrote: > Hi all, > > Suppose I have a data frame myDF, col A is factor, col B is numeric, col C > is character. I can get their classes by > > > class(myDF$A) > > but is there a quick way to show what classes of all columns are? Thank you. > > Tian Depen

Re: [R] Making R script to run in a console

2006-08-14 Thread Marc Schwartz (via MN)
On Mon, 2006-08-14 at 14:12 -0300, Ronaldo Reis-Jr. wrote: > Hi, > > is possible to make a R script to run under a console without open the R > environment? > > Something like this example.R > > #!/usr/bin/R > > function(name="Put here your name") { > print(name) > } > > In a console I make >

Re: [R] categorical data

2006-08-09 Thread Marc Schwartz (via MN)
On Wed, 2006-08-09 at 18:07 +0200, Christian Oswald wrote: > Dear List, > > I neeed a grouped list with two sort of categorical data. I have a data > .frame like this. > yearcat.b c > 1 2006a1 125 212 > 2 2006a2 256 212 > 3 2005a1

Re: [R] parameter yaxs / function hist (graphics)

2006-08-09 Thread Marc Schwartz (via MN)
Paulo, Try the following: x <- rnorm(100) par(xaxs = "i") par(yaxs = "i") hist(x, breaks = seq(-4, 4, 0.5), ylim = c(0, 40), xlim = c(-4, 4)) box() The problem is that graphics:::plot.histogram() is coded in such a way that the use of 'xaxs' and 'yaxs' are ineffectual, as they are not p

Re: [R] Sampling from a Matrix

2006-08-09 Thread Marc Schwartz (via MN)
On Tue, 2006-08-08 at 14:10 -0400, Liaw, Andy wrote: > From: Marc Schwartz > > > On Fri, 2006-08-04 at 12:46 -0400, Daniel Gerlanc wrote: > > > Hello all, > > > > > > Consider the following problem: > > > > > > There is a matrix of probabilities: > > > > > > > set.seed(1) > > > > probs <- arra

Re: [R] Netiquette, was Re: ... "gfortran and gcc...

2006-08-08 Thread Marc Schwartz (via MN)
[Re-sending to the list only for archiving, as my original reply had too many recipients and I cancelled it.] 1. One need not be subscribed to the list to be able to post. Thus, indeed, a poster may not see all postings. 2. On the relatively rare occasion (thanks to Martin) where the server seem

Re: [R] Retain only those records from a dataframe that exist in another dataframe

2006-08-07 Thread Marc Schwartz (via MN)
On Mon, 2006-08-07 at 14:05 -0600, Mark Na wrote: > Dear R community, > > I have two dataframes "first" and "second" which share a unique identifier. > > I wish to make a new dataframe "third" retaining only the rows in > "first" which also occur in "second". > > I have tried using merge but can

Re: [R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Marc Schwartz (via MN)
On Fri, 2006-08-04 at 19:44 +0100, Prof Brian Ripley wrote: > On Fri, 4 Aug 2006, Marc Schwartz (via MN) wrote: > > > On Fri, 2006-08-04 at 09:47 -0600, Andrew Kniss wrote: > > > I've tried several different ways to accomplish this, but as yet to no > > > avail.

Re: [R] Sampling from a Matrix

2006-08-04 Thread Marc Schwartz (via MN)
On Fri, 2006-08-04 at 12:46 -0400, Daniel Gerlanc wrote: > Hello all, > > Consider the following problem: > > There is a matrix of probabilities: > > > set.seed(1) > > probs <- array(abs(rnorm(25, sd = 0.33)), dim = c(5,5), dimnames = > > list(1:5, letters[1:5])) > > probs > a b

Re: [R] Simulate an Overdispersed(extra-variance poisson process)?

2006-08-04 Thread Marc Schwartz (via MN)
On Fri, 2006-08-04 at 10:33 -0600, Spencer Jones wrote: > Is there a function in R comparable to rpois that can simulate random > variables from an overdispersed poisson distribution? If there is not a > function any ideas/references on how to program one? Take a look at ?rnbinom or library

Re: [R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Marc Schwartz (via MN)
Actually Gabor, using your solution with 'atop', which I had not considered, it will work with base graphics: par(oma = c(0, 0, 2, 0), mar = c(5, 6, 0.25, 2), lheight = 1) plot(1:10, ylab = expression(atop(" "^14*C*"-glyphosate line1", line2))) HTH, Marc On

Re: [R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Marc Schwartz (via MN)
On Fri, 2006-08-04 at 09:47 -0600, Andrew Kniss wrote: > I've tried several different ways to accomplish this, but as yet to no > avail. My y-axis for a plot has a rather long label, and thus I have > been using "/n" to break it into two lines. However, to make it > technically correct for public

Re: [R] How to access a column by its label?

2006-08-03 Thread Marc Schwartz (via MN)
On Thu, 2006-08-03 at 14:44 -0400, Neil McLeod wrote: > Hi all, > > Is there any way to access a column of a data frame by its label (title) > rather than its column index? For example, I'd like to be able to select > animals[,"weight"] rather than animals[,3], if the third column of the > "animal

Re: [R] bullseye or polar display of "circular" data

2006-08-03 Thread Marc Schwartz (via MN)
On Thu, 2006-08-03 at 07:46 -0700, Michael Jerosch-Herold wrote: > I have data for several rings of a left heart chamber, and which I > would like to display in concentric rings, with color-encoding of the > values. Each ring corresponds to one slice through the heart, and the > rings correspond to

Re: [R] Vectorizing a "for" loop

2006-08-03 Thread Marc Schwartz (via MN)
On Thu, 2006-08-03 at 10:10 -0400, Daniel Gerlanc wrote: > Hello all, > > Consider the following problem: > > There are two vectors: > > rows <- c(1, 2, 3, 4, 5) > columns <- c(10, 11, 12, 13, 14) > > I want to create a matrix with dimensions length(rows) x length(columns): > > res <- matrix(n

Re: [R] Extracting a row number from a matrix

2006-08-01 Thread Marc Schwartz (via MN)
On Tue, 2006-08-01 at 07:03 -0700, Kartik Pappu wrote: > Hi all, > > I have a matrix with each column containing a large number of integers > (0 and above). in each column beyond a certain row (say row 120 in > column 1, row 134 in column 2, 142 in column 3...) there are only > 0's. I want to fi

Re: [R] greek letters, text, and values in labels

2006-07-25 Thread Marc Schwartz (via MN)
On Tue, 2006-07-25 at 13:12 -0700, Adrian Dragulescu wrote: > Hello, > > I want to have a title that will look something like: > "Results for \theta=2.1", given that I have a variable theta=2.1, and > \theta should show on the screen like the greek letter. > > I've tried a lot of things: > theta

Re: [R] unique, but keep LAST occurence

2006-07-24 Thread Marc Schwartz (via MN)
On Mon, 2006-07-24 at 12:00 -0500, [EMAIL PROTECTED] wrote: > ?unique says > > Value: > > An object of the same type of 'x'. but if an element is equal to > one with a smaller index, it is removed. > > However, I need to keep the one with the LARGEST index. > Can someone please show me

Re: [R] character to vector

2006-07-21 Thread Marc Schwartz (via MN)
On Fri, 2006-07-21 at 15:15 -0500, [EMAIL PROTECTED] wrote: > I have an object of mode character that contains a long sequence of letters. > How can I convert this object into a vector with each element of the vector > containing a single letter? Essentially, I want to break the long string of >

Re: [R] connection to X11 problem

2006-07-21 Thread Marc Schwartz (via MN)
On Fri, 2006-07-21 at 11:47 -0700, Paquet, Agnes wrote: > Dear List, > > I am a new Mac user and I am having problem generating png (or jpeg) > using the GUI version of R. I installed R-2.3.1.dmg (custom install with > everything selected) and X11User.pkg but I am still getting the > following X11

Re: [R] Reading data with blank elements

2006-07-21 Thread Marc Schwartz (via MN)
On Fri, 2006-07-21 at 05:43 -0700, Ahamarshan jn wrote: > Hi, > I have a dataset saved in *.csv format, that contains > 13 columns (the first column being the title name and > the rest experiments) and about 2500 rows. > Not all columns in the row have data in it > i.e for eg >

Re: [R] R-help in a newsgroup

2006-07-18 Thread Marc Schwartz (via MN)
On Tue, 2006-07-18 at 11:30 -0700, Darren Weber wrote: > Hi, > > I find a lot of the R-help email traffic overloads my inbox. My IT > managers are not really happy for me to be subscribed to several > high-traffic email lists. I don't want to lose my contact with the > R-help emails, so I'm havi

Re: [R] String manipulation and formatting

2006-07-17 Thread Marc Schwartz (via MN)
On Mon, 2006-07-17 at 16:07 +0200, Bashir Saghir (Aztek Global) wrote: > I'm trying to write a simple function that does the following: > > [command] xify(5.2) > [output] XXX.XX > > [command] xify(3) > [output] XXX > > Any simple solutions (without using python/perl/unix script/...)? >

Re: [R] SAS to R translator for particular procedures

2006-07-14 Thread Marc Schwartz (via MN)
On Fri, 2006-07-14 at 18:35 +0200, Mehmet Somel wrote: > Dear /Bill Paterson, > > while trying to find a way to convert SAS code into R, I came across > your one time e-mail message > (http://www.ens.gu.edu.au/robertk/R/help/99b/0908.html). I'd appreciate > to learn if anything came out of this

Re: [R] Generate object names from variables

2006-07-14 Thread Marc Schwartz (via MN)
On Fri, 2006-07-14 at 16:57 +0200, Georg Otto wrote: > Hi, > > I want to generate object names out of variables in a sort of variable > substitution. > > first i generate some vectors and an empty list: > > > vector.a<-c("a","b") > > vector.b<-c("c","d") > > vector.c<-c("e","f") > > vectors<-c("

Re: [R] Keep value lables with data frame manipulation

2006-07-12 Thread Marc Schwartz (via MN)
On Wed, 2006-07-12 at 17:41 +0100, Jol, Arne wrote: > Dear R, > > I import data from spss into a R data.frame. On this rawdata I do some > data processing (selection of observations, normalization, recoding of > variables etc..). The result is stored in a new data.frame, however, in > this new dat

Re: [R] replace values in data frame

2006-07-07 Thread Marc Schwartz (via MN)
Wade, Given that you appear to have multiple search and replace items to deal with, here is a possible loop based "Global Search and Replace" solution: gsr <- function(Source, Search, Replace) { if (length(Search) != length(Replace)) stop("Search and Replace Must Have Equal Number of Items\

Re: [R] replace values in data frame

2006-07-07 Thread Marc Schwartz (via MN)
Thanks for re-posting onlist. My offlist reply: The 'list' argument, as per ?replace, needs to be a vector of one or more indices into another vector, generally the source vector argument 'x', not the actual values that you want to replace. 'list' can either be explicit integers as the indices, o

Re: [R] How to change the type of segments ends?

2006-07-07 Thread Marc Schwartz (via MN)
On Fri, 2006-07-07 at 11:47 -0400, Lu, Jiang Jane wrote: > Hi, > > I am trying to plot odds ratios and the corresponding confidence > intervals in horizontal segments. It would be ideal if the confidence > interval segment can be drawn with little vertical bars at both ends. I > have tried very ha

Re: [R] replace values in data frame

2006-07-07 Thread Marc Schwartz (via MN)
On Fri, 2006-07-07 at 11:20 -0400, Wade Wall wrote: > Hi all, > > I have a three columned list that I have imported into R. The first column > is a plot (ex. Plot1), the second is a species name (ex ACERRUB) and the > third a numeric value. I want to replace some of the second column names > wit

Re: [R] probably need to se sapply but i can't get it

2006-06-26 Thread Marc Schwartz (via MN)
On Mon, 2006-06-26 at 12:40 -0500, [EMAIL PROTECTED] wrote: > Hi : I think I need to use sapply but I can't figure this out. > > Suppose I have two vectors : tempa ( 4, 6,10 ) and tempb > ( 11,23 ,39 ) > > > I want a function that returns 4:11,6:23 and 10:39 as vectors. > > I tried : > > s

Re: [R] PowerPoint - eps not suitable

2006-06-23 Thread Marc Schwartz (via MN)
On Fri, 2006-06-23 at 14:02 -0400, Michael H. Prager wrote: > Previous posters have argued for EPS files as a desirable transfer > format for quality reasons. This is of course true when the output is > through a Postscript device. > > However, the original poster is making presentations with P

Re: [R] Producing png plot in batch mode

2006-06-23 Thread Marc Schwartz (via MN)
On Fri, 2006-06-23 at 17:23 +0100, Vittorio wrote: > I have set up an R procedure that is launched every three hours by > crontab in a unix server. Crontab runs at regular intervals the > following line: > R CMD BATH myprog.R > > myprog.R (which by the way uses > R2HTML) should create an update

Re: [R] PowerPoint

2006-06-23 Thread Marc Schwartz (via MN)
On Fri, 2006-06-23 at 18:16 +0200, Philipp Pagel wrote: > On Fri, Jun 23, 2006 at 09:21:37AM -0400, Gabor Grothendieck wrote: > > Note that jpg, bmp and png are in less desirable bit mapped formats whereas > > eps is in a more desirable vector format (magnification and shrinking does > > not involv

Re: [R] PowerPoint

2006-06-23 Thread Marc Schwartz (via MN)
Has anyone tried this with OO.org's Impress or Writer on Windows to see if the same behavior occurs? My recollection from prior experience on Windows (it's been a while) is that a subtle resize takes place when pasting/importing graphics into the aforementioned apps. You can right click on the g

Re: [R] columnwise multiplication?

2006-06-23 Thread Marc Schwartz (via MN)
On Fri, 2006-06-23 at 11:53 -0400, Mu Tian wrote: > Hi all, > > I'd like to do a multiplication between 2 matrices buy only want resulsts of > cloumn 1 * column 1, column 2 * column 2 and so on. > > Now I do > > C <- diag(t(A) %*% B) > > Is there a bulit in way to do this? > > Thank you. You

Re: [R] useR! Thanks

2006-06-22 Thread Marc Schwartz (via MN)
On Thu, 2006-06-22 at 15:40 -0500, Jeffrey Horner wrote: > Achim Zeileis wrote: > [...] > > The plan is to provide the original presentation slides of the > > panelists and a video of the whole panel disc, and probably some minutes > > and/or further information. > > Did you happen to video Ivan M

Re: [R] help on ploting various lines

2006-06-21 Thread Marc Schwartz (via MN)
On Wed, 2006-06-21 at 11:55 -0500, Marc Schwartz (via MN) wrote: > On Wed, 2006-06-21 at 12:22 -0400, Baoqiang Cao wrote: > > Dear All, > > > > I tried to plot a variety of lines(curves) on same figure. What I did > > is, > > plot(x=x1,y=y1) > &g

Re: [R] help on ploting various lines

2006-06-21 Thread Marc Schwartz (via MN)
On Wed, 2006-06-21 at 12:22 -0400, Baoqiang Cao wrote: > Dear All, > > I tried to plot a variety of lines(curves) on same figure. What I did > is, > plot(x=x1,y=y1) > lines(x=x2,y=y2) > lines(x=x3,y=y3) > ... > > In my data, the maximum of y1 is much smaller than those maximums of > other y vecto

Re: [R] How add degree character in axis?

2006-06-09 Thread Marc Schwartz (via MN)
On Fri, 2006-06-09 at 11:01 +, fernando espindola wrote: > Hi user R, > > I am try to put degree character in axis x, but don't make this. I have > the next code: > > plot(mot[,5], > time1,xlim=c(-45,-10),type="l",yaxt="n",ylab="",col=1,lwd=2,xlab="",xaxt="n") > > The range of value in ax

Re: [R] Rotate numbers on the Y axis on a multiple Boxplot chart

2006-06-08 Thread Marc Schwartz (via MN)
On Thu, 2006-06-08 at 15:44 +0100, d d [EMAIL PROTECTED] ac uk wrote: > Hello All, > > I am trying to format a box plot chart for a report so it matches other > charts I have created in other software programs. My problem is that I > need to rotate the values on the Y axis by 45 degrees, I have

Re: [R] how to do multiple comparison in the nonparametric statistical analysis?

2006-06-07 Thread Marc Schwartz (via MN)
On Thu, 2006-06-08 at 00:10 +0800, zhijie zhang wrote: > Dear Rusers, > As we all know , there are many methods to do multiple comparison in the > parametric statistical analysis, But i can't find some in nonparametric > statistical analysis. > Could anybody give some suggestions? Have you looke

Re: [R] multiple data sets on one plot

2006-06-07 Thread Marc Schwartz (via MN)
On Wed, 2006-06-07 at 10:30 -0500, Mark L Sessing wrote: > Hello, > > I am learning how to use R, and I cannot figure out how to plot more > than one data set on a single plot. Can you help me out? > > Cheers, > Mark It depends upon the type of plot (scatter, lines, bar, etc.) and whether or n

Re: [R] Strange behaviour of cbind

2006-06-06 Thread Marc Schwartz (via MN)
On Tue, 2006-06-06 at 13:44 -0700, Dirk Vandekerckhove wrote: > Hi, > > Is this intended behaviour of cbind? > > > a<-c(0,1,2,3) > > a > [1] 0 1 2 3 > > a<-as.ordered(a) > > a > [1] 0 1 2 3 > Levels: 0 < 1 < 2 < 3 > > a<-a[a!=0] #remove the zero from a > > a > [1] 1 2 3 > Levels: 0 < 1 < 2 < 3 >

Re: [R] simple index question

2006-06-01 Thread Marc Schwartz (via MN)
On Thu, 2006-06-01 at 11:06 -0400, Mu Tian wrote: > I want to get index number of 0s, like > > x <- c(1, 2, 0, 3, 0, 4) > > I want an output of > > 3, 5 > > Thank you. See ?which > which(x == 0) [1] 3 5 HTH, Marc Schwartz __ R-help@stat.math.eth

Re: [R] merging

2006-05-30 Thread Marc Schwartz (via MN)
On Tue, 2006-05-30 at 15:38 -0500, Marc Schwartz (via MN) wrote: > On Tue, 2006-05-30 at 19:08 +0100, Gavin Simpson wrote: > > Dear List, > > > > Given, > > > > y <- matrix(c(0,1,1,1,0,0,0,4,4), ncol = 3, byrow = TRUE) > > rownames(y) <- c("a

Re: [R] merging

2006-05-30 Thread Marc Schwartz (via MN)
On Tue, 2006-05-30 at 19:08 +0100, Gavin Simpson wrote: > Dear List, > > Given, > > y <- matrix(c(0,1,1,1,0,0,0,4,4), ncol = 3, byrow = TRUE) > rownames(y) <- c("a","b","c") > colnames(y) <- c("1","2","3") > y > y2 <- y[2:3, ] > rownames(y2) <- c("x","z") > y2 > > how can I stop > > merge(y, y2

Re: [R] Regression line limited by the range of values

2006-05-24 Thread Marc Schwartz (via MN)
On Wed, 2006-05-24 at 21:53 +0200, Andreas Svensson wrote: > Thankyou very much Marc for that nifty little script. > > When I use it on my real dataset though, the lines are fat in the middle > and thinner towards the ends. I guess it's because "lines" draw one > fitted line for each x, and if y

Re: [R] Joining variables

2006-05-24 Thread Marc Schwartz (via MN)
On Wed, 2006-05-24 at 14:45 -0400, Guenther, Cameron wrote: > Hello, > > If I have two variables that are factors or characters and I want to > create a new variable that is the combination of both what function can > I use to accomplish this? > > Ex. > > Var1 Var2 > SA100055113

Re: [R] Regression line limited by the rage of values

2006-05-24 Thread Marc Schwartz (via MN)
On Wed, 2006-05-24 at 18:51 +0200, Andreas Svensson wrote: > Hi > > In R, using plot(x,y) followed by abline(lm(y~x)) produces a graph > with a regression line spanning the whole plot . This means that the > line extends beyond the swarm of data points to the defined of default > plot regio

Re: [R] How to make attributes persist after indexing?

2006-05-24 Thread Marc Schwartz (via MN)
On Wed, 2006-05-24 at 17:20 +0100, Heinz Tuechler wrote: > Dear All! > > For descriptive purposes I would like to add attributes to objects. These > attributes should be kept, even if by indexing only part of the object is > used. > I noted that some attributes like levels and class of a factor ex

Re: [R] conditional replacement

2006-05-23 Thread Marc Schwartz (via MN)
On Tue, 2006-05-23 at 11:40 -0700, Sachin J wrote: > Hi > > How can do this in R. > > >df > > 48 > 1 > 35 > 32 > 80 > > If df < 30 then replace it with 30 and else if df > 60 replace it > with 60. I have a large dataset so I cant

Re: [R] Subset a list

2006-05-22 Thread Marc Schwartz (via MN)
On Mon, 2006-05-22 at 17:55 -0400, Doran, Harold wrote: > I have a data frame of ~200 columns and ~20,000 rows where each column > consists of binary responses (0,1) and a 9 for missing data. I am > interested in finding the columns for which there are fewer than 100 > individuals with responses of

Re: [R] writing 100 files

2006-05-22 Thread Marc Schwartz (via MN)
On Mon, 2006-05-22 at 16:24 +0100, Federico Calboli wrote: > Hi All, > > I need to write as text files 1000 ish variation of the same data frame, > once I permute a row. > > I would like to use the function write.table() to write the files, and > use a loop to do it: > > for (i in 1:1000){ >

Re: [R] How can you buy R?

2006-05-19 Thread Marc Schwartz (via MN)
On Fri, 2006-05-19 at 17:59 -0300, Rogerio Porto wrote: > While reading the various answers, I've remembered that > the juridic part can't be that so simple. If I'm not fogeting > something, there are some packages in R that has a more > restrictive licence than GPL. > > HTH, > > Rogerio. Any CR

  1   2   3   >