[R] Suppress 'x' when appending to a csv file

2007-09-08 Thread John Kane
Is there any convenient way to supress the x that appears in csv export files? I would like to be able to export a file and add a comment to it yet still be able to read it back into R. I don't see any way to get rid of the x that seperates the different appended parts. Thanks EXAMPLE x 1 2 3

Re: [R] Suppress 'x' when appending to a csv file

2007-09-08 Thread John Kane
PROTECTED] wrote: On Sat, 2007-09-08 at 11:41 -0400, John Kane wrote: Is there any convenient way to supress the x that appears in csv export files? I would like to be able to export a file and add a comment to it yet still be able to read it back into R. I don't see any way to get rid

Re: [R] kendall test

2007-09-06 Thread John Kane
?cor perhaps --- elyakhlifi mustapha [EMAIL PROTECTED] wrote: Hello, I thougth that there is a function which does the kendall test in R, I writed on the console apropos(kendall) and I didn't found anything can you tell me how could I do to use the kendall test? Thanks.

Re: [R] Excel

2007-08-29 Thread John Kane
--- Rolf Turner [EMAIL PROTECTED] wrote: On 28/08/2007, at 7:16 PM, J Dougherty wrote: snip PS, I quit using Excel for most important work after it returned a negative variance on some data I was collecting descriptive statistics on. Those of you who have not seen it

Re: [R] How to cite the the PDF user's guide for LIMMA

2007-08-29 Thread John Kane
This depends on what style manual you , your publisher, or your institution uses. One common syle (APA ) recommends this: http://library.osu.edu/sites/guides/apagd.php#sid --- Vallejo, Roger [EMAIL PROTECTED] wrote: Dear All, How to cite the PDF user's guide for the LIMMA package? This

Re: [R] FAQ 7.x when 7 does not exist. Useability question

2007-08-27 Thread John Kane
--- Duncan Murdoch [EMAIL PROTECTED] wrote: Deepayan Sarkar wrote: On 8/23/07, Duncan Murdoch [EMAIL PROTECTED] wrote: On 8/23/2007 11:28 AM, Prof Brian Ripley wrote: On Thu, 23 Aug 2007, John Kane wrote: The FAQ Section 7 is a very useful place for new users

Re: [R] How to shade vertical bands in a graph?

2007-08-24 Thread John Kane
?rect Something like this should work but I did not take the time to get the rectangles to fit properly. aa - rnorm(25) yl - -1.5 yh - 2.2 xleft - c(4, 9, 15 ,20) xright - xleft + 3 plot(aa, ylim= c(yl,yh), type=n) rect(xleft, yl, xright,yh, col=yellow) points(aa, col=red) --- del pes [EMAIL

Re: [R] How to fit an linear model withou intercept

2007-08-23 Thread John Kane
?lm Details A formula has an implied intercept term. To remove this use either y ~ x - 1 or y ~ 0 + x. See formula for more details of allowed formulae. Is this what you want? --- Michal Kneifl [EMAIL PROTECTED] wrote: Please could anyone help me? How can I fit a linear model where

[R] FAQ 7.x when 7 does not exist. Useability question

2007-08-23 Thread John Kane
The FAQ Section 7 is a very useful place for new users to find out any number of R idiosycracies. However there is no numbering on the FAQ Table of Content or on the Sections Tables of Contents. An R-help list reply of Read FAQ 7.10 in response to a question about converting a factor to numeric

Re: [R] FAQ 7.x when 7 does not exist. Useability question

2007-08-23 Thread John Kane
rather than Google. On 8/23/07, John Kane [EMAIL PROTECTED] wrote: The FAQ Section 7 is a very useful place for new users to find out any number of R idiosycracies. However there is no numbering on the FAQ Table of Content or on the Sections Tables of Contents. An R-help list

Re: [R] FAQ 7.x when 7 does not exist. Useability question

2007-08-23 Thread John Kane
11:28 AM, Prof Brian Ripley wrote: On Thu, 23 Aug 2007, John Kane wrote: The FAQ Section 7 is a very useful place for new users to find out any number of R idiosycracies. However there is no numbering on the FAQ Table of Content or on the Sections Tables of Contents. Hmm, doc

Re: [R] FAQ 7.x when 7 does not exist. Useability question

2007-08-23 Thread John Kane
Yes that is it. Thanks --- Michael A. Miller [EMAIL PROTECTED] wrote: John == John Kane [EMAIL PROTECTED] writes: Apologies for the poor quality of the screen capture. I think the first one is a screen cap of http://cran.r-project.org/doc/FAQ/R-FAQ.html. Is that correct

Re: [R] FAQ 7.x when 7 does not exist. Useability question

2007-08-23 Thread John Kane
--- Prof Brian Ripley [EMAIL PROTECTED] wrote: On Thu, 23 Aug 2007, John Kane wrote: The FAQ Section 7 is a very useful place for new users to find out any number of R idiosycracies. However there is no numbering on the FAQ Table of Content or on the Sections Tables of Contents

Re: [R] summing columns of data frame by group

2007-08-21 Thread John Kane
?by perhaps --- Daniel O'Shea [EMAIL PROTECTED] wrote: I have a data frame and one separate vector that is a grouping variable for the data frame. I would like to take all rows of the data frame belonging to each group and then sum the columns with out using a for statement. Something

Re: [R] R on a flash drive

2007-08-20 Thread John Kane
--- Erin Hodgess [EMAIL PROTECTED] wrote: Dear R People: Has anyone run R from a flash drive, please? If so, how did it work, please? Yes I run R, occasionally, on a USB with no problem on WindowsXP. It works well, albeit a bit more slowly than from the hard drive which is as you would

Re: [R] R on a flash drive

2007-08-20 Thread John Kane
Oops meant to send this to the list. --- John Kane [EMAIL PROTECTED] wrote: --- Erin Hodgess [EMAIL PROTECTED] wrote: Dear R People: Has anyone run R from a flash drive, please? If so, how did it work, please? Yes I run R, occasionally, on a USB with no problem on WindowsXP

Re: [R] recommended combo of apps for new user?

2007-08-20 Thread John Kane
--- hadley wickham [EMAIL PROTECTED] wrote: On 8/18/07, John Kane [EMAIL PROTECTED] wrote: I'm just starting to get a grasp on how R works so don't take my words too seriously but have a look at http://addictedtor.free.fr/graphiques/ for some idea of what R can do for publication

Re: [R] recommended combo of apps for new user?

2007-08-18 Thread John Kane
I'm just starting to get a grasp on how R works so don't take my words too seriously but have a look at http://addictedtor.free.fr/graphiques/ for some idea of what R can do for publication quality graphics. It is always possible that you might need another graphics package as well but I think

Re: [R] multiple colors within same line of text

2007-08-17 Thread John Kane
Hi Andrew, This is pretty clumsy but it seems to work. I suspect there are many better ways x - seq(0, 1, length=21) plot(db) colour - c(red, blue) mytext - c(RED, BLUE) mtext( mytext, at= c(2,5), side=1, col=colour) --- Andrew Yee [EMAIL PROTECTED] wrote: Hi, I'm interested in using

Re: [R] multiple colors within same line of text

2007-08-17 Thread John Kane
Correction x - seq(0, 1, length=21) db - dbeta(x, 3,1) plot(db) colour - c(red, blue) mytext - c(RED, BLUE) mtext( mytext, at= c(2,5), side=1, col=colour) --- John Kane [EMAIL PROTECTED] wrote: Hi Andrew, This is pretty clumsy but it seems to work. I suspect there are many better ways

Re: [R] ung�ltige Versionsspezifikation

2007-08-15 Thread John Kane
I think we need more information about your system. Please run sessionInfo() and include the information in another posting. --- Mag. Ferri Leberl [EMAIL PROTECTED] wrote: Dear everybody, excuse me if this question ist trivial, however, I have now looked for an answer for quite a while and

Re: [R] Convert factor to numeric vector of labels

2007-08-15 Thread John Kane
My reason for setting stringsAsFactors = FALSE is more that I really dislike having R convert what I think are character variables to factors when I import data. I suspect that it takes quite a few new users by surprise that what they had intended to be a character variable has become a factor.

Re: [R] Very new - beginners questions

2007-08-13 Thread John Kane
Hi Richard, No specific answers for your data questions but for learning R there are any number of resources. There are links to references for books and a large number of on-line materials on the R website. Have a look at the list on the bottom left of the screen for books and other which

Re: [R] Convert factor to numeric vector of labels

2007-08-13 Thread John Kane
This is one of R's rather _endearing_ little idiosyncrasies. I ran into it a while ago. http://finzi.psych.upenn.edu/R/Rhelp02a/archive/98090.html For some reason, possibly historical, the option stringAsFactors is set to TRUE. As Prof Ripley says FAQ 7.10 will tell you

Re: [R] Help wit matrices

2007-08-10 Thread John Kane
Will something like this help? mm - matrix(rnorm(100),nrow=10) mm nn - mm .5 nn --- Lanre Okusanya [EMAIL PROTECTED] wrote: Hello all, I am working with a 1000x1000 matrix, and I would like to return a 1000x1000 matrix that tells me which value in the matrix is greater than a

Re: [R] Changing font in boxplots

2007-08-08 Thread John Kane
I don't know if boxplot will accept a font argument.m From ?boxplot it is not clear. You may need to set the par() command before the boxplot Example: par(font.lab=4) boxplot(mass ~ family, data=mydata, ylab=mass %, xlab=family,las=1, cex.axis=1) --- G Iossa, School Biological Sciences [EMAIL

Re: [R] Changing font in boxplots

2007-08-08 Thread John Kane
and ?par, both of which make this clear. John Kane has claimed that what inline pars are used by boxplot() is 'not clear from ?boxplot', but the lack of clarity is his, not in the documentation. ?boxplot refers you to ?bxp, and that spells out exactly which inline pars are used

Re: [R] Relocating Axis Label/Title

2007-08-08 Thread John Kane
Have a look at mar in ?par. You might want to try something like mar=c(5, 5, 4, 2) + 0.1 rather than the default of c(5, 4, 4, 2) + 0.1 . --- Lorenzo Isella [EMAIL PROTECTED] wrote: Dear All, I am experiencing some problems with relocating an axis title. I visited the following link before

Re: [R] how to include bar values in a barplot?

2007-08-08 Thread John Kane
Do you mean like this? my.values=10:15 x - barplot(my.values, ylim=c(0,11)) text(x, my.values, labels=my.values, pos=3) It is very bad practice and OOo should have its fingers slapped for perpetuating such a form. --- Donatas G. [EMAIL PROTECTED] wrote: How do I include bar

Re: [R] Plot in log scale

2007-08-05 Thread John Kane
What appears to be happening is that you are plotting all the data sets but all the lines () are being plotted outside the original plotting frame. If you just plot out$a with axes=TRUE you will see what the y coordinates are. You need to explicitly set the ylim values. There is a mockup of

Re: [R] Invert Likert-Scale Values

2007-08-04 Thread John Kane
Will ?recode in the car package do what you want? x - 1:4 recode(x, 1='4';2='3' ;3='2'; 4='1') --- Alexis Delevett [EMAIL PROTECTED] wrote: Hi! I am using R to process some community survey data. Several item responses are recorded via a 7-point Likert-Scale. As I have coded the

Re: [R] plot to postscript orientation

2007-08-03 Thread John Kane
I seem to see the same problem that Miruna gets just to confirm that it is not just her set-up. I'm using GSview4.8 if that helps --- Uwe Ligges [EMAIL PROTECTED] wrote: Miruna Petrescu-Prahova wrote: Hi I am trying to save some plots in a postscript file. When I generate the

Re: [R] plot to postscript orientation

2007-08-03 Thread John Kane
I don't know about for Miruna but it does not work for me. I tried postscript (figure.eps, paper=letter) http://ca.geocities.com/jrkrideau/R/eps.figure.pdf postscript(figure.eps, paper=special, width=5, height=4) with similaar same results. Interstingly enough figure.eps imports completely

Re: [R] plot to postscript orientation-update

2007-08-03 Thread John Kane
Follow-up I seem to have manged to get the eps file to work using: postscript(C:/temp/figure.eps, horizontal=F, paper=special, height=8, width=8, pointsize=12) Exactly why I'm not sure since I just copied some old code that I had used a year or so ago. --- Vorlow Constantinos [EMAIL

Re: [R] New user help with plot.default

2007-08-02 Thread John Kane
Hi Paul, I think one of the problems is that xlim is expecting a numerical vector something like c(1:8) implying a contiuous variable and yours is categorical. I have made quite few changes but does this do what you want? It may not be the most effient but it runs :)

Re: [R] New user help with plot.default

2007-08-02 Thread John Kane
() - --- PaulGaskell [EMAIL PROTECTED] wrote: I've replied to your email but essentially I just have a problem with the last line below, the at and labels arguments are different lengths. Also the top edge of the ylabel letters are cut off by the left hand side of the plot frame. John

Re: [R] y axix number into horizontal direction

2007-08-02 Thread John Kane
?par see las This should work --- plot(0,0,xaxt=n, type=n, ylim=c(0,100), las=1, ) mtext(35,side=2,at=35, line =1, las=1) --- --- Rebecca Ding [EMAIL PROTECTED] wrote: Dear R users, I used plot() and mtext()

Re: [R] Cut marks on a plot's y-axis to indicate it is a truncated axis

2007-08-01 Thread John Kane
--- David Lloyd [EMAIL PROTECTED] wrote: Hi, I've plotted a Kaplan-Meier curve but the curves only range from 0.7 to 1 on the y-axis. Therefore I have used: - ylim=c(0.7,1) [although I think convention dictates that you plot 0.5 to 1 to show the median? A few papers I've read have

Re: [R] Operator and

2007-07-25 Thread John Kane
mm - matrix(1:9, nrow=3) ; mm subset(mm[,1],mm[,1] 3) # Note I used 3 not 2 here. Have a look at some of the introductory documents on the R site ( Contributed documents under OTHER in the documentation). They should answer a lot of your basic questions like this. Documents by Lemon,

Re: [R] plots

2007-07-25 Thread John Kane
--- amna khan [EMAIL PROTECTED] wrote: Hi Sir I did not find any function of graph which plot one variable on x-axis and 2 or more than 2 variables on y-axis. I think ?points or ?lines may be what you want. Moreover, how can I change the labels of L-moments diagram obtained by

Re: [R] SOS

2007-07-20 Thread John Kane
?round x - 1.2223 round(x,2) [1] 1.22 --- Fabrice McShort [EMAIL PROTECTED] wrote: Hi Julian, Thank you very much. Please let me know how to get 2 numbers after the decim. Best regards, Fabrice Date: Fri, 20 Jul 2007 08:15:42 -0700 From: [EMAIL PROTECTED] To: [EMAIL

Re: [R] tapply

2007-07-19 Thread John Kane
I do not understand what you want. If aps is constant over each class then the mean for each class is equal to any value of aps. Using your example you can do tapply(icu1$aps, icu1$d, mean) but it does not give you anything new. Can you explain the problem a bit more? --- sigalit

Re: [R] Classification

2007-07-18 Thread John Kane
Have a look at the recode function in the car package library(car) ?recode should give you what you need. --- Ing. Michal Kneifl, Ph.D. [EMAIL PROTECTED] wrote: Hi, I am also a quite new user of R and would like to ask you for help: I have a data frame where all columns are numeric

Re: [R] learning the R language (for those strong in Ruby)

2007-07-14 Thread John Kane
--- David C. James [EMAIL PROTECTED] wrote: I feel like I'm not firing at all cylinders with the R language, despite reading over the R Language Definition. Has anyone seen something like an R for Rubyists guide (i.e. teaching the R language for those who are more familar with

Re: [R] how to create matrix in a loop

2007-07-13 Thread John Kane
You don't need to do a loop. You can do it with an apply statement I think. See ?apply If the matrix is mat to do the test by column try: apply(mat, 2, shapiro.test) --- Tavpritesh Sethi [EMAIL PROTECTED] wrote: Hi all, How does one create a matrix of values in a loop. For example, I have

Re: [R] Algorythmic Question on Array Filtration

2007-07-13 Thread John Kane
I think we need a bit more information and perhaps a small example data set to see what you want. I am not familiar with term mass window. Is this a confidence interval around the mass value? --- Johannes Graumann [EMAIL PROTECTED] wrote: Dear All, I have a data frame with the columns

Re: [R] Saving workspace data

2007-07-13 Thread John Kane
--- Renger van Nieuwkoop [EMAIL PROTECTED] wrote: Hi I imported a lot of text-files with R and saved them by using: save(list=ls(),file=Grunddaten.Rdata) After that I wanted to check my saved data and wrote source(Grunddaten.Rdata) This gives me an error: Error in

Re: [R] elementary statistics with R (rkward?)

2007-07-12 Thread John Kane
--- Donatas G. [EMAIL PROTECTED] wrote: Hi, I am trying to learn some basic statistics stuff but I cannot find any elementary statistics exercises using R language. Using RKward would be even better... I need that in analysing sociological data, obtained through questionnairres -

Re: [R] transform excel data into graph

2007-07-09 Thread John Kane
I am not sure exactly what you want but see if this will work. It will give you a dotchart. Assume your data.frame is dat First give the lessons column a name. See ?names convert numbers in data.frame to a matrix for dotchart dmat - as.matrix(dat[,2:4]) Draw dotchart using dat$lessons as a

Re: [R] problem assigning to indexed data frame element

2007-07-06 Thread John Kane
Check what is happening with current.spec. It looks to me as if you are trying to use a factor as an index. See below --- Drescher, Michael (MNR) [EMAIL PROTECTED] wrote: Hi All, Sorry if I ask an obvious thing, I am still new to R ... I created a data frame of given dimensions to

Re: [R] help with vector construction

2007-07-05 Thread John Kane
Or an alternative to Henrique's if you want to select all the rows from row 2 up to the 3*n row this may work. n - 2 myvector - data1[2:(2*n), 3] --- Juan Pablo Fededa [EMAIL PROTECTED] wrote: Hi all, I want to make a vector with the third column of a matrix, but only for the 2+3n

Re: [R] probabilty plot

2007-07-04 Thread John Kane
Is this what you mean ? --- mydata - c(1,2,3,4,5,7,5,4,3) plot(mydata) --- --- along zeng [EMAIL PROTECTED] wrote: Hi all, I am a freshman of R,but I am interested in it! Those days,I am learning pages on NIST,with url

Re: [R] select row

2007-07-03 Thread John Kane
?which Use it to find the rows and then extract the rows selection - mydata[which(mydata$id==25-2006), ] should work. --- Leonardo Lami [EMAIL PROTECTED] wrote: Hi all, I have a little problem selecting some rows from a data.frame. I'd like to select the rows where a determinated

Re: [R] vertically concatenating data frames

2007-07-03 Thread John Kane
?rbind --- Aydemir, Zava (FID) [EMAIL PROTECTED] wrote: Hi, what is the recommended way to vertically concatenate 2 data frames with the same column names but different number of rows? My problem is something along these lines: df1 - data.frame(var1=var1,var2=var2,var3=var3) #

Re: [R] basics: changing the directory

2007-07-02 Thread John Kane
RSiteSearch(change directory) will take you to an archive site that should help. or type ?setwd to get the relevant man page. --- Georg Ehret [EMAIL PROTECTED] wrote: Dear Ms. R, I struggle with a very basic command for most of you: How to change the working-directory by

Re: [R] Homals, PsychoR, Bayesm

2007-07-02 Thread John Kane
You need to tell us what operating system you are using. --- faisal afzal siddiqui [EMAIL PROTECTED] wrote: hi, I am working on conjoint analysis, how I can install Homals, PsychoR, and Bayesm in my computer, also I need some examples in R, would u please help me? also advise if there

Re: [R] Function call within a function.

2007-06-29 Thread John Kane
thing. I have been trying to use the existing data structures and I may need to start from scratch. Thanks for the help. You have given me some useful ideas. John --- John Kane [EMAIL PROTECTED] wrote: I am trying to call a funtion within another function and I clearly am

Re: [R] Function call within a function.

2007-06-29 Thread John Kane
, nts$cda) ### modified how called. - Original Message - From: John Kane [EMAIL PROTECTED] To: R R-help r-help@stat.math.ethz.ch Sent: Thursday, June 28, 2007 12:03 PM Subject: [R] Function call within a function. I am trying to call a funtion within another function and I

Re: [R] Function call within a function.

2007-06-29 Thread John Kane
PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Kane Sent: Thursday, June 28, 2007 12:04 PM To: R R-help Subject: [R] Function call within a function. I am trying to call a funtion within another function and I clearly am misunderstanding what I should do. Below

Re: [R] Function call within a function.

2007-06-29 Thread John Kane
- alpha bb - beta myfile - file nts - lstfun(myfile, aa, bb) ### CODE ADDED HERE mysum - eval(parse(text=nam1)) #mysum - nam1[,3]*5 return(mysum) } results - ukn(dd1, a, b, nts$cda) ### modified how called. - Original Message - From: John Kane [EMAIL PROTECTED] To: R R-help r

[R] Function call within a function.

2007-06-28 Thread John Kane
I am trying to call a funtion within another function and I clearly am misunderstanding what I should do. Below is a simple example. I know lstfun works on its own but I cannot seem to figure out how to get it to work within ukn. Basically I need to create the variable nts. I have probably missed

Re: [R] Adding exponents (superscript format) to a plot

2007-06-22 Thread John Kane
# Using expression to add superscipts to the labels vec=c(1,10,100,1000,1,10,100,1000) plot(vec,vec,log=xy, axes=F) axis(1, at=10^c(0,2,4,6), labels=expression(1, 10^2, 10^4, 10^6)) axis(2, at=10^c(0,2,4,6), labels=expression(1, 10^2, 10^4, 10^6), las=1) box() --- Judith

Re: [R] add line to data.frame

2007-06-20 Thread John Kane
--- Manuele Pesenti [EMAIL PROTECTED] wrote: Dear R user, how can I update a data.frame adding new lines? ?rbind I need to create a second data frame from a first one with only some of their entrys filtering the value of a specific column... How can I do this? ?subset thankyou

Re: [R] Replace number with month

2007-06-20 Thread John Kane
Simple brute force approach that should work: barplot(Freq,MM, names=c('Jan','Feb','Mar', 'Apr', 'May', 'Jun','Jul', 'Aug', 'Sept', 'Oct','Nov', 'Dec')) --- Spilak,Jacqueline [Edm] [EMAIL PROTECTED] wrote: Hi all I have a multiple datasets that look like this MM Freq 1 30 2

Re: [R] outlying

2007-06-19 Thread John Kane
You might want to have a look at the outliers package on CRAN. --- elyakhlifi mustapha [EMAIL PROTECTED] wrote: hello, are there functions to detecte outlying observations in samples? thanks.

Re: [R] Could not find lmer function in {Matrix} package

2007-06-19 Thread John Kane
I don't think it's there. I have had a look at the ref doc and lmer does not show up. Have a look at http://finzi.psych.upenn.edu/R/Rhelp02a/archive/67904.html It looks like it's in the lme4 package now. --- Steve Brady [EMAIL PROTECTED] wrote: I am having trouble calling the lmer

Re: [R] Histogram

2007-06-19 Thread John Kane
Your subsetting expression in lines does not make any sense at all. Not tested but maybe something like: lines (density(subset(x, x 0.05 x -0.05)bw=SJ), col='red) --- livia [EMAIL PROTECTED] wrote: Hello, I am using the following codes to plot a histogram and density line for x. For the

Re: [R] how to plot two graphics in one window

2007-06-15 Thread John Kane
?points x - 1:10 plot(exp(x),col=red, type =o) points(sin(x), col=blue) --- Miguel Caro [EMAIL PROTECTED] wrote: Hello , Maybe this question you answered before, but i couldnt find something indicated in the mailing list. I wish to plot two graphics in one window, for example y=sinx

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

2007-06-15 Thread John Kane
--- Douglas Bates [EMAIL PROTECTED] wrote: On 6/15/07, Nicholas Lewin-Koh [EMAIL PROTECTED] wrote: Hi, I just saw this thread. This issue, and the larger scale issue of open source in industry is being addressed. One has to realize that the behemoth that is the clinical aperatus

Re: [R] installing packages

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

Re: [R] extractor rows from a matrix

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

Re: [R] function with xyplot

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

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

2007-06-14 Thread John Kane
Yes it does If you have R installed simply type ?lm This gives you the appropriate help page. Note for a no intercept regression A formula has an implied intercept term. To remove this use either y ~ x - 1 or y ~ 0 + x. See formula for more details of allowed formulae. --- [EMAIL PROTECTED]

Re: [R] question about formula for lm

2007-06-14 Thread John Kane
First check the value of Ytext. Try Ytext - X$Yvar --- Pedro Mardones [EMAIL PROTECTED] wrote: Dear all; Is there any way to make this to work?: .x-rnorm(50,10,3) .y-.x+rnorm(50,0,1) X-data.frame(.x,.y) colnames(X)-c(Xvar,Yvar) Ytext-Yvar lm(Ytext~Xvar,data=X) # doesn't run

Re: [R] Tools For Preparing Data For Analysis

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

Re: [R] Design library installation problem

2007-06-13 Thread John Kane
I cannot find the posting but I believe Brian Ripley posted something here a day or so ago that said that Design had not passed some of the 2.5.0 tests. --- Ian Watson [EMAIL PROTECTED] wrote: Dear Listers I have tried to install Frank Harrell's two libaries: Hmisc and Design. I

Re: [R] Subscription

2007-06-13 Thread John Kane
--- Lucy Namu [EMAIL PROTECTED] wrote: I would like to subscribe and get free software for statistical analysis. Lucy It looks like you are subscribed. To download R http://www.r-project.org/. Some other sources of free software http://www.epidata.dk/

Re: [R] extractor rows from a matrix

2007-06-13 Thread John Kane
ex1 - ht[,1]and so on? Have a look at Chapter 5 in the Introduction to R --- billycorg [EMAIL PROTECTED] wrote: hi! i have a little problem: my data's matrix has 1093 rows and 3 columns. i'd like to extract each rows.. something like this: ht= my matrix Dt=(???)=a vector with

Re: [R] Lines in dotchart dotplot ?

2007-06-12 Thread John Kane
Thanks again. Both layouts look very usefull and certainly a lot better than I was getting on my own. --- Deepayan Sarkar [EMAIL PROTECTED] wrote: On 6/11/07, John Kane [EMAIL PROTECTED] wrote: --- [EMAIL PROTECTED] wrote: On 6/9/07, John Kane [EMAIL PROTECTED] wrote

Re: [R] Lines in dotchart dotplot ?

2007-06-11 Thread John Kane
--- [EMAIL PROTECTED] wrote: On 6/9/07, John Kane [EMAIL PROTECTED] wrote: Is it possible to use dotchart or dotplot and set the lines in such a way that they only extend from the left y-axis to the data point? Yes (sort of) in dotplot at least. E.g., dotplot(VADeaths, groups

Re: [R] Textpad help

2007-06-11 Thread John Kane
Hi Mary, You really have not given us much to go on. An example of the code that you were trying to run would be a great help (as it says down below : PLEASE do read the posting guide. The point about code is important. However the first thing to check is your file path. This is my first guess

Re: [R] Coding categorical variables in mixed environment

2007-06-10 Thread John Kane
try ?recode in package:car --- spime [EMAIL PROTECTED] wrote: Hi R users, Suppose we have following data for a regression model: AGE:numerical SEX: male/female categorical COLOR: {blue, green, pink} categorical RESPONSE: yes/no categorical AGE SEX COLOR RESPONSE

Re: [R] character to time problem

2007-06-09 Thread John Kane
read the help desk article in R News 4/1 for more. On 6/8/07, John Kane [EMAIL PROTECTED] wrote: Looks much better. I seldom use dates for much and didn't think to look at the sort.POSIXlt function. If I understand this correctly the sort.POSIXlt with na.last = FALSE is dropping all

[R] Lines in dotchart dotplot ?

2007-06-09 Thread John Kane
Is it possible to use dotchart or dotplot and set the lines in such a way that they only extend from the left y-axis to the data point? I seem to remember that Wm Cleveland did this in his 1985 book The elements of graphing data. In cases where one has a true starting or O point on the

Re: [R] character to time problem

2007-06-08 Thread John Kane
and then dropping them? Thanks again - Original Message - From: John Kane [EMAIL PROTECTED] To: R R-help r-help@stat.math.ethz.ch Sent: Thursday, June 07, 2007 2:17 PM Subject: [R] character to time problem I am trying to clean up some dates and I am clearly doing something wrong. I have

Re: [R] character to time problem

2007-06-08 Thread John Kane
of these: sort(as.Date(aa$times, %d/%m/%Y)) [1] 1995-03-02 2001-05-12 2007-02-14 sort(as.Date(aa$times, %d/%m/%Y), na.last = TRUE) [1] 1995-03-02 2001-05-12 2007-02-14 NA NA [6] NA On 6/7/07, John Kane [EMAIL PROTECTED] wrote: I am trying to clean up some dates and I am clearly

Re: [R] overplots - fixing scientific vs normal notation in output

2007-06-08 Thread John Kane
--- Peter Lercher [EMAIL PROTECTED] wrote: Moving from S-plus to R I encountered many great features and a much more stable system. Currently, I am left with 2 problems that are handled differently: 1) I did lots of overplots in S-Plus using par(new=T,xaxs='d',yaxs='d') to fix the axes

[R] character to time problem

2007-06-07 Thread John Kane
I am trying to clean up some dates and I am clearly doing something wrong. I have laid out an example that seems to show what is happening with the real data. The coding is lousy but it looks like it should have worked. Can anyone suggest a) why I am getting that NA appearing after the

Re: [R] Svar: Re: help with simple R-question

2007-06-06 Thread John Kane
column in the dataframe but an array of rownames ( I don't know how they are stored). I think you can do the same thing as you did for the data.frame but as I say, I am not sure I understand the question. Would you post a little example? Rina John Kane [EMAIL PROTECTED] 06/05/07 3:17

Re: [R] list

2007-06-06 Thread John Kane
--- elyakhlifi mustapha [EMAIL PROTECTED] wrote: hello, I wanna know how to create a list of list if it's possible and if it isn't possible how to do without. thanks. Why? The question is not clear and could mean several things. Can you explain a bit?

Re: [R] Svar: Re: help with simple R-question

2007-06-06 Thread John Kane
-3.775851e-03 1100 -3.220044e-03 10007995 1.848914e-02 10008295 -4.583903e-03 10008792 -9.518371e-03 10033401 -7.538132e-03 10048900 1.540309e-02 Thanks again Rina John Kane [EMAIL PROTECTED] 06/06/07 11:38 --- Rina Miehs [EMAIL PROTECTED] wrote: thanks, that works

Re: [R] R: x-y data

2007-06-06 Thread John Kane
There are a couple of ways but I think you need to read about R . Have a look at Managing data http://cran.r-project.org/doc/contrib/Lemon-kickstart/index.html and / or read the Intro to R manual available on CRAN or probably from the R help icon. you have a data.frame DF you can assign names

Re: [R] R help

2007-06-06 Thread John Kane
--- scott flemming [EMAIL PROTECTED] wrote: Hi, I wonder whether R can finish the following project: I want to make a chart to represent 10 genes. Each gene has orientation and length. Therefore, a gene can be represented by arrows. Can R be used to draw 10 arrows in one line ?

Re: [R] help with simple R-question

2007-06-05 Thread John Kane
--- Rina Miehs [EMAIL PROTECTED] wrote: hello what do i write for R to recognize both columns? In the R-script downunder you can see that i use tapply to get my information out of my data, and then i need to use it as a dataframe with both columns! It is like R is using the first

Re: [R] read table

2007-06-05 Thread John Kane
R considers Mazda RX4 Wag to be three columns. There fore you have 6 columns of data and only 6 names. Use like this Mazda RX4 and Mazda Rx4 Wag to indicate each is a single character value. --- jiqiang yao [EMAIL PROTECTED] wrote: Hi, I'm a novice of R. I want to read the

Re: [R] Extracting lists in the dataframe $ format

2007-06-05 Thread John Kane
I think your indexing is wrong in the function. Note the tble[a] rather than tble[,a]. Try: regression=function(tble,a,b) { plot.new() plot(tble[,a]~tble[,b]) lmm=lm(tble[,a]~tble[,b]) abline(lmm) anova(lmm) } --- Stan Hopkins

Re: [R] Re : I need some help please!

2007-06-02 Thread John Kane
--- Bernard Colin [EMAIL PROTECTED] wrote: To whom it may concern, I want to plot two or more graphics in the same window by the means of the plot command. To do that, I have tried the add=TRUE option, but this last one does not work! Do you have an hint for me please? ?par mfcol,

Re: [R] Per-row minima for matrix

2007-05-31 Thread John Kane
apply(mat1, 1, min) should do it ( or max ) --- Dirk De Becker [EMAIL PROTECTED] wrote: Hi all, Probably a very easy question, but I was wondering whether or not it is possible to calculate the per-row (or per-column) minima and maxima for a matrix object. Thanks in advance,

Re: [R] in unix opening data object created under win

2007-05-25 Thread John Kane
--- [EMAIL PROTECTED] wrote: On Unix R's version is 2.3.1 and on PC its 2.4.1. I dont have the rights to install newer version of R on Unix. I tried different upload methods. No one worked. On Unix it looks as follows (dots to hide my userid):

Re: [R] In which package is the errbar command located?

2007-05-25 Thread John Kane
Hmisc --- Judith Flores [EMAIL PROTECTED] wrote: __ 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 and provide commented, minimal,

  1   2   3   4   >