Re: [R] Errore : requires numeric/complex matrix/vector arguments

2013-10-20 Thread John Kane
ction as described in the links: https://github.com/hadley/devtools/wiki/Reproducibility http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example Welcome to the R-help list John Kane Kingston ON Canada > -Original Message- > From: valentina...@hotmai

Re: [R] Want to create a histogram

2013-10-20 Thread John Kane
stall ggplot2 package install.packages("ggplot2") library(ggplot2) dat1 <- data.frame( aa = c("very bad", "bad", "fair", "good", "very good"), bb = c(159, 374, 3765, 11388, 6708)) ggplot(dat1, aes(aa, bb)) + geom_bar(stat=&quo

Re: [R] Make Multiple plots in R

2013-10-31 Thread John Kane
Without knowing what the data looks like it is a bit difficult to know. See ?dput on how to supply sample data. However I think that something like the ggplot2 package would be a good way to go, John Kane Kingston ON Canada > -Original Message- > From: j.kipl...@cgiar.org

Re: [R] ggplot2 - how to get rid of bar boarder lines

2013-10-31 Thread John Kane
At a guess, don't use colour. John Kane Kingston ON Canada > -Original Message- > From: dimitri.liakhovit...@gmail.com > Sent: Wed, 30 Oct 2013 14:11:37 -0400 > To: r-help@r-project.org > Subject: [R] ggplot2 - how to get rid of bar boarder lines > > Hell

Re: [R] Newbie Question: Repeatable Tasks

2013-11-04 Thread John Kane
Just type the commands in the Source window of RStudioo, debug, save as a .r file and source it. I don't see any particular reason to have three scripts once everything is running correctly but you may find it useful. John Kane Kingston ON Canada > -Original Message

Re: [R] help with ggplot legend specification

2013-11-04 Thread John Kane
ize))+ geom_point(shape=21,colour="black") pl + theme(legend.key.size = unit(2, "cm")) John Kane Kingston ON Canada > -Original Message- > From: mike.conk...@gfk.com > Sent: Thu, 31 Oct 2013 21:08:02 +0100 > To: r-help@r-project.org > Subject: [R] help with ggplot l

Re: [R] R Beginner - Need Perhaps 5 - 10 Minutes of R User Time to Learn Few Basics

2013-11-14 Thread John Kane
session should look more or less like this http://www.rstudio.com/ide/ . If you don't have those four panels then you have an RStudio problem. John Kane Kingston ON Canada > -Original Message- > From: zfeinst...@isgmn.com > Sent: Wed, 13 Nov 2013 13:57:17 + > To: r-h

Re: [R] making a barplot with table of experimental conditions underneath (preferably ggplot2)

2013-11-14 Thread John Kane
U","U","0.05%RG", "0.1%RG")) df$labs <- paste(df[,4],"\n ",df[,5], "\n ",df[,6]) # create labels df.plot <- qplot(experiment,mean,data = df, xlab="", ylab="# peptides identified")+ geom_point(fill="grey&quo

Re: [R] making a barplot with table of experimental conditions underneath (preferably ggplot2)

2013-11-15 Thread John Kane
Oops, that last line of code should read df.plot + scale_x_discrete( labels = df$labs) John Kane Kingston ON Canada > -Original Message- > From: jrkrid...@inbox.com > Sent: Thu, 14 Nov 2013 09:02:19 -0800 > To: n.hub...@ncmls.ru.nl, r-help@r-project.org > Subject: R

Re: [R] Plotting multiple trends on one graph

2013-11-25 Thread John Kane
s, Station )) + geom_point() + facet_grid(TagID ~ .) John Kane Kingston ON Canada > -Original Message- > From: nhoughto...@gmail.com > Sent: Sun, 24 Nov 2013 08:49:03 -0800 > To: r-help@r-project.org > Subject: [R] Plotting multiple trends on one graph > >> >>

[R] losing line of mtext when saving to png format

2010-06-13 Thread John Kane
I have a simple graph (oode below) which looks fine on the screen but when I save it in png format the title (actually the last mtext line) is cut off. I am pretty sure that I am doing something very stupid but other than playing around with the png height and width commands which don't seem to

Re: [R] HOW to install RSQLite database

2010-06-13 Thread John Kane
select a cran mirror > Packages > Select Cran Mirror In R use the following command install.packages("RSQLite") --- On Sun, 6/13/10, vijaysheegi wrote: > From: vijaysheegi > Subject: Re: [R] HOW to install RSQLite database > To: r-help@r-project.org > Received: Sunday, June 13, 2010, 2:

Re: [R] losing line of mtext when saving to png format

2010-06-13 Thread John Kane
format > To: "John Kane" > Cc: "R R-help" > Received: Sunday, June 13, 2010, 3:32 PM > Hey John, > > I believe this issue is that the png device is different > from the > onscreen one.  You set the margins for the on screen > with a call to > par

Re: [R] tables

2010-06-21 Thread John Kane
?prop.table probably. RSiteSearch at R Site Search http://finzi.psych.upenn.edu/nmz.html or ?RSiteSearch would probably given you the anwser in about 30 seconds. --- On Mon, 6/21/10, Erin Hodgess wrote: > From: Erin Hodgess > Subject: [R] tables > To: "R help" > Received: Monday, June 21,

Re: [R] Popularity of R, SAS, SPSS, Stata...

2010-06-22 Thread John Kane
--- On Tue, 6/22/10, Patrick Burns wrote: > From: Patrick Burns > Subject: Re: [R] Popularity of R, SAS, SPSS, Stata... > To: "Joris Meys" > Cc: r-help@r-project.org > Received: Tuesday, June 22, 2010, 5:34 AM > Identifying with the most dreaded experience > in university is not so good for

Re: [R] Popularity of R, SAS, SPSS, Stata...

2010-06-22 Thread John Kane
--- On Tue, 6/22/10, Liviu Andronic wrote: > From: Liviu Andronic > Subject: Re: [R] Popularity of R, SAS, SPSS, Stata... > To: "John Kane" > Cc: "Joris Meys" , "Patrick Burns" > , r-help@r-project.org > Received: Tuesday, June 22, 2010,

Re: [R] Popularity of R, SAS, SPSS, Stata...

2010-06-22 Thread John Kane
--- On Tue, 6/22/10, Marc Schwartz wrote: > From: Marc Schwartz > Subject: Re: [R] Popularity of R, SAS, SPSS, Stata... > To: "John Kane" > Cc: "Liviu Andronic" , r-help@r-project.org, "Patrick > Burns" > Received: Tuesday, June 22, 2010, 9:

Re: [R] Project

2010-06-22 Thread John Kane
Why is it outputting six file? You really need to provide more information on what is happening. --- On Mon, 6/21/10, Colton Hunt wrote: > From: Colton Hunt > Subject: [R] Project > To: r-help@r-project.org > Received: Monday, June 21, 2010, 10:35 PM > I am an intern in Virginia Beach and > I

Re: [R] Popularity of R, SAS, SPSS, Stata...

2010-06-23 Thread John Kane
"Quantitative aggregation manager. Double your pay, easy." I love it. It's up there with "Conflict resolution manager"==Army officer --- On Wed, 6/23/10, Jim Lemon wrote: > From: Jim Lemon > Subject: Re: [R] Popularity of R, SAS, SPSS, Stata... > To:

Re: [R] Analyzing large transition matrix

2010-06-23 Thread John Kane
?dotchart perhaps? --- On Wed, 6/23/10, Bill Harris wrote: > From: Bill Harris > Subject: [R] Analyzing large transition matrix > To: "r-help" > Received: Wednesday, June 23, 2010, 9:30 AM > Let's say you have a dataframe of car > trade-ins.  For example, each row > contains > > oldcar   new

Re: [R] Analyzing large transition matrix

2010-06-24 Thread John Kane
--- On Thu, 6/24/10, Jim Lemon wrote: > From: Jim Lemon > Subject: Re: [R] Analyzing large transition matrix > To: "Bill Harris" > Cc: "r-help" > Received: Thursday, June 24, 2010, 7:44 AM > On 06/23/2010 11:30 PM, Bill Harris > wrote: > > Let's say you have a dataframe of car trade-ins.  >

Re: [R] i want create script

2010-06-25 Thread John Kane
I'd suggest having a look at the manuals on the [url=http://www.r-project.org][b]R[/b][/url]site, especially the Introduction to R and R Data Import/Export. Some helpful tutorials may be found at http://www.math.ilstu.edu/dhkim/Rstuff/Rtutor.html and http://www.sph.umich.edu/csg/abecasis/class

Re: [R] What is wrong with this code?

2010-06-30 Thread John Kane
--- On Wed, 6/30/10, Cable, Samuel B Civ USAF AFMC AFRL/RVBXI wrote: > From: Cable, Samuel B Civ USAF AFMC AFRL/RVBXI > Subject: Re: [R] What is wrong with this code? > To: r-help@r-project.org > Received: Wednesday, June 30, 2010, 3:41 PM > OK, let me wipe the egg off of my > face The p

Re: [R] What is wrong with this code?

2010-06-30 Thread John Kane
Okay, here is a reproducible example of a possible solution (actually it probably does not do what you want but it's a start for discussion. Note it is actual code and data which is what is needed. === str1 <- "abc" str2 <- "abcd" str3 <- "ef

Re: [R] merging/intersecting 2 data frames

2010-06-30 Thread John Kane
Have you changed the values in b.df? My reading of the original b.df in Erin's post was that there were no common values in PATIENT_ID and ID. --- On Tue, 6/29/10, jim holtman wrote: > From: jim holtman > Subject: Re: [R] merging/intersecting 2 data frames > To: "Erin Hodgess" > Cc: "R help

Re: [R] possible to plot number line in R?

2010-07-01 Thread John Kane
Here is a simple 'brute force' way to do it (assuming I understand what you want) == text1 <- "Interval 1" text2 <- "Inteval 2" text3 <- "Interval 3" ycord <- 3.3 plot(1:21, rep(3,21), type="l", xlab="Number Line", ylab="",yaxt="n")

Re: [R] write.csv() : attempt to set 'append' ignored... Why?

2010-07-15 Thread John Kane
Use write.table() instead. I thought that I had used write.csv() with an append before but I cannot find an example. Perhaps append= is not available in write.csv --- On Thu, 7/15/10, Cliff Clive wrote: > From: Cliff Clive > Subject: [R] write.csv() : attempt to set 'append' ignored... Wh

Re: [R] Creating Enumerated Variables

2010-07-16 Thread John Kane
I think this is simpler but still not all that clean. === xx <- structure(list(ID = 1:9, Age = c(10L, 10L, 10L, 11L, 11L, 11L, 10L, 10L, 11L), School = c(1L, 2L, 1L, 1L, 1L, 2L, 1L, 1L, 2L ), Grade = c(98L, 97L, 92L, 90L, 80L, 70L, 80L, 7

Re: [R] sort file names in numerical order

2010-07-17 Thread John Kane
library(gtools) ?mixedorder --- On Sat, 7/17/10, Sebastian Gibb wrote: > From: Sebastian Gibb > Subject: [R] sort file names in numerical order > To: r-help@r-project.org > Received: Saturday, July 17, 2010, 4:31 AM > Hello, > > I get some file names by list.files(). > These names are in al

Re: [R] Reshaping data

2010-07-19 Thread John Kane
Assuming your data is in data.frame xx library(reshape) mm1 <- melt(xx, id=c("ID")) cast(mm1, ID ~ variable ) = --- On Mon, 7/19/10, Thomas Jensen wrote: > From: Thomas Jens

Re: [R] Sequence from 2 Vectors

2010-07-19 Thread John Kane
enum.list <- function(x,y) { mylist <- NULL for(i in 1:length(x)) { mylist[[i]] <- x[i]:y[i] } xx <- unlist(mylist) } a <- c(1,2,3) b <- a+2 (harry <- enum.list(a,b) ) --- On Mon, 7/19/10, Suphajak Ngamlak wrote: > From: Suphajak Ngamlak > Subject: [R] Sequence from 2 Vectors > To: r-help@r

Re: [R] simplify if statement in R ?

2010-07-20 Thread John Kane
Will something like the %in% statements below help? x1 <- 1 x2 <- 5 y1 <- c(2,3) y2 <- c(4,5) y3 <- c(7,8) x1 %in% y1 ||x2 %in% y2 x1 %in% y1 ||x2 %in% y3 --- On Tue, 7/20/10, Jim Maas wrote: > From: Jim Maas > Subject: [R] simplify if statement in R ? > To: r-help@r-project.org > Receiv

Re: [R] Issues reshaping data

2010-07-21 Thread John Kane
A small useable data set would help immensely. Have a look at ?dput as a way to supply one. --- On Wed, 7/21/10, JGull8502 wrote: > From: JGull8502 > Subject: [R] Issues reshaping data > To: r-help@r-project.org > Received: Wednesday, July 21, 2010, 6:05 PM > > Hello All, > > I'm having so

Re: [R] xtable

2010-07-21 Thread John Kane
Try str(influencia) I don't think xtable is intended to print lists. --- On Wed, 7/21/10, Silvano wrote: > From: Silvano > Subject: [R] xtable > To: r-help@r-project.org > Received: Wednesday, July 21, 2010, 4:15 PM > Hi, > > How do I build a table from a regression model adjusted > using xta

Re: [R] how to write legend of a plot

2010-07-22 Thread John Kane
There is no simpler way. It's not automatic but it is fairly simple at the most basic. It can get a bit complicated later. ltxt <- c("cat","dog") x <- 1:5 y <- 1:5 plot (x,y, type='n', ann=FALSE) lines(x,y,col=1,lty="solid") points(x,y,pch=16) legend(1,4,ltxt, pch=16) --- On Thu, 7/22/10, Y

Re: [R] Newbie cross tabulation issue

2010-09-09 Thread John Kane
It would help if you included a bit of sample data. See ?dput as a way of doing this. Also a good place to start is by looking at the package "reshape". Have a look at http://had.co.nz/reshape/ for some information on the package. --- On Wed, 9/8/10, Jonathan Finlay wrote: > From: Jonathan Fi

Re: [R] Alignment of lines within barplot bars

2010-09-09 Thread John Kane
Like this? x <- 4:7 barplot(x, density=10, angle=180) --- On Thu, 9/9/10, Steve Murray wrote: > From: Steve Murray > Subject: [R] Alignment of lines within barplot bars > To: r-help@r-project.org > Received: Thursday, September 9, 2010, 11:35 AM > > Dear all, > > I have a barplot upon whic

Re: [R] Alignment of lines within barplot bars

2010-09-09 Thread John Kane
Okay, I misread what you wanted. Try this == x <- 4:7 positions <- barplot(x) mid <- x/2 arrows(positions-.5,mid,positions+.5,mid,angle=0) == --- On Thu, 9/9/10, Steve Murray wrote: > From: St

Re: [R] adding labels above bars in a barplot

2010-09-10 Thread John Kane
Are you trying to say that you don't really like barplots? At least the OP did not ask for error bars as well. :) --- On Fri, 9/10/10, Dennis Murphy wrote: > From: Dennis Murphy > Subject: Re: [R] adding labels above bars in a barplot > To: "Antonio Olinto" > Cc: "R-help" > Received: Fr

Re: [R] Create Dot Chart

2010-09-19 Thread John Kane
?dotchart perhaps. --- On Sun, 9/19/10, avsha38 wrote: > From: avsha38 > Subject: [R] Create Dot Chart > To: r-help@r-project.org > Received: Sunday, September 19, 2010, 10:46 AM > > Hello everyone... > > I would like to create a chart (see below), how can I do it > with R? > > Any help, sug

Re: [R] help to sum up data frame

2010-11-07 Thread John Kane
With your data set as the data.frame xx library(reshape2) xx <- melt(xx) dcast(xx, name ~ variable, sum) --- On Sun, 11/7/10, Mohan L wrote: > From: Mohan L > Subject: [R] help to sum up data frame > To: r-help@r-project.org > Received: Sunday, November 7, 2010, 8:59 AM > Dear All, > > I ha

Re: [R] Populating then sorting a matrix and/or data.frame

2010-11-11 Thread John Kane
--- On Thu, 11/11/10, William Dunlap wrote: > From: William Dunlap > Subject: Re: [R] Populating then sorting a matrix and/or data.frame > To: "Peter Langfelder" , r-help@r-project.org > Received: Thursday, November 11, 2010, 4:19 PM > Peter, > > Your example doesn't work for me unless I > se

Re: [R] sum in vector

2010-11-14 Thread John Kane
Have a look at the reshape2 package. http://had.co.nz/reshape/ reshape2 is, to the user a slight modification of rehape but the author says it is much faster. The code below seems to do what you want. - xx <- data.frame(market, price) l

Re: [R] replace a row in a matrix

2010-11-14 Thread John Kane
Indexing (xx <- matrix(1:4, nrow=2)) vec <- 5:6 xx[2,] <- vec xx --- On Sun, 11/14/10, cassie jones wrote: > From: cassie jones > Subject: [R] replace a row in a matrix > To: r-help@r-project.org > Received: Sunday, November 14, 2010, 10:59 AM > Dear all, > > > I created a n*2 matrix and

Re: [R] how to get rid of unused space on all 4 borders in plot() render

2010-11-21 Thread John Kane
Alternatively give ggplot2 package a try: x= c(1,5,7,-3,4) y= c(2,4,-5,2,5) xx <- data.frame(x,y) library(ggplot2) qplot(x,y, data=xx) --- On Sun, 11/21/10, madr wrote: > From: madr > Subject: [R] how to get rid of unused space on all 4 borders in plot() render > To: r-help@r-project.org

[R] specifying colours in a ggplot2 piechart

2010-11-23 Thread John Kane
Someone was asking how to do a 16 category piechart in OpenOffice Calc and it appears that it can not be done (which we, probably, should be happy about) but I thought that I'd try it in ggplot2. It works but I then thought I'd like to make the colours more distinctive but fro some reason I do

Re: [R] specifying colours in a ggplot2 piechart

2010-11-23 Thread John Kane
auguie wrote: > From: baptiste auguie > Subject: Re: [R] specifying colours in a ggplot2 piechart > To: "John Kane" > Cc: r-h...@stat.math.ethz.ch > Received: Tuesday, November 23, 2010, 2:02 PM > fixing the various typos in your > code, this works, > > l

Re: [R] latex() etc.: How to nicely format a matrix for a LaTeX document?

2010-12-30 Thread John Kane
Have a look at xtable. --- On Thu, 12/30/10, Marius Hofert wrote: > From: Marius Hofert > Subject: [R] latex() etc.: How to nicely format a matrix for a LaTeX document? > To: "Help R" > Received: Thursday, December 30, 2010, 11:50 AM > Dear (T)eXpeRts, > > I try to create a LaTeX table from

Re: [R] Plotting colour-coded points

2011-01-05 Thread John Kane
With xx as your data.frame library(ggplot2) qplot(a, id, data=xx, color=b) --- On Wed, 1/5/11, ANJAN PURKAYASTHA wrote: > From: ANJAN PURKAYASTHA > Subject: [R] Plotting colour-coded points > To: r-help@r-project.org > Received: Wednesday, January 5, 2011, 2:00 PM > Hi, > I have a file of

Re: [R] Multiple subsets of data

2011-01-06 Thread John Kane
Is there any common variable? From your description, I don't see how you would link a species to a community. I mean if you select species a in df1 how would you know what community it is in? --- On Thu, 1/6/11, Chris Mcowen wrote: > From: Chris Mcowen > Subject: [R] Multiple subsets of dat

Re: [R] Find and remove elemnts of a data frame

2011-01-06 Thread John Kane
With dataframe xx (naming a data.frame as data.frame is a bit dicey subset(xx, xx[,4]> -45) --- On Thu, 1/6/11, Alaios wrote: > From: Alaios > Subject: [R] Find and remove elemnts of a data frame > To: r-help@r-project.org > Received: Thursday, January 6, 2011, 10:07 AM > Dear all, > I have a

Re: [R] Multiple subsets of data

2011-01-06 Thread John Kane
;NA0402", "NA0402", "AT1302", "AT1302"), species = c("a", "c", "b", "c", "a", "b" )), .Names = c("community", "species"), class = "data.frame", row.names = c(NA, -6L))

[R] Accessing data via url

2011-01-06 Thread John Kane
# Can anyone suggest why this works datafilename <- "http://personality-project.org/r/datasets/maps.mixx.epi.bfi.data"; person.data <- read.table(datafilename,header=TRUE) # but this does not? dd <- "https://sites.google.com/site/jrkrideau/home/general-stores/trees.txt"; treedata <- read.tab

Re: [R] Accessing data via url

2011-01-06 Thread John Kane
g the same results.  It currently is not all that important but it's definately annoying.  --- On Thu, 1/6/11, Alberto Negron wrote: From: Alberto Negron Subject: Re: [R] Accessing data via url To: "John Kane" Cc: "R R-help" Received: Thursday, January 6, 2011, 3:

Re: [R] Accessing data via url

2011-01-06 Thread John Kane
--- On Thu, 1/6/11, Alberto Negron wrote: From: Alberto Negron Subject: Re: [R] Accessing data via url To: "John Kane" Cc: "R R-help" Received: Thursday, January 6, 2011, 4:20 PM there is an option in google doc to make public that file providing and http url, try Shar

Re: [R] Accessing data via url

2011-01-07 Thread John Kane
--- On Fri, 1/7/11, Henrique Dallazuanna wrote: > From: Henrique Dallazuanna > Subject: Re: [R] Accessing data via url > To: "Dieter Menne" > Cc: r-help@r-project.org > Received: Friday, January 7, 2011, 7:07 AM > With the ssl.verifypeer = FALSE > argument it w

Re: [R] Accessing data via url

2011-01-07 Thread John Kane
--- On Fri, 1/7/11, Dieter Menne wrote: > From: Dieter Menne > Your original file is no longer there, but when I try RCurl > with a png file > that is present, I get a certificate error: > > Dieter Since replaced with dd <- "https://sites.google.com/site/jrkrideau/home/general-stores/dupli

Re: [R] Accessing data via url

2011-01-07 Thread John Kane
anks > page.  You haven't followed the posting guide and told > us your OS, and> what the section says does depend on the OS. Sorry I thought I had it in my sig file . Added now. R 2.12.0 & Windows 7 > > On Thu, 6 Jan 2011, John Kane wrote: > > > #   Can anyo

Re: [R] Accessing data via url

2011-01-07 Thread John Kane
g on googe servers? I had not realised there was something like  rawToChar(). Amazing what R does. Thank , --- On Fri, 1/7/11, Henrique Dallazuanna wrote: From: Henrique Dallazuanna Subject: Re: [R] Accessing data via url To: "John Kane" Cc: r-help@r-project.org, "Dieter Me

Re: [R] Accessing data via url

2011-01-07 Thread John Kane
Great, but how did you do that?  --- On Fri, 1/7/11, Henrique Dallazuanna wrote: From: Henrique Dallazuanna Subject: Re: [R] Accessing data via url To: "John Kane" Cc: r-help@r-project.org, "Dieter Menne" Received: Friday, January 7, 2011, 1:31 PM Google

Re: [R] Waaaayy off topic...Statistical methods, pub bias, scientific validity

2011-01-07 Thread John Kane
--- On Fri, 1/7/11, Peter Langfelder wrote: > From: Peter Langfelder > Subject: Re: [R] Wyy off topic...Statistical methods, pub bias, > scientific validity > To: "r-help@r-project.org" > Received: Friday, January 7, 2011, 2:06 AM > >From a purely statistical and > maybe somewhat naive p

Re: [R] Accessing data via url

2011-01-08 Thread John Kane
Thanks --- On Fri, 1/7/11, David Winsemius wrote: > From: David Winsemius > Subject: Re: [R] Accessing data via url > To: "John Kane" > Cc: "Henrique Dallazuanna" , r-help@r-project.org, "Dieter > Menne" > Received: Friday, January 7, 2011,

Re: [R] Help with Data Transformation

2011-01-10 Thread John Kane
That sample data set is really hard to read. Could you resent it after having used dput on it? A file output with dput is easily read into R and makes seeing what you need much easier. BTW what are the = doing? Thanks --- On Mon, 1/10/11, Guy Jett wrote: > From: Guy Jett > Subject: [R

Re: [R] Help with Data Transformation

2011-01-10 Thread John Kane
5, 6), bata = c(12, 42, NA, 45, 32, 54), batb = c(13, 15, 17, 19, 21, 23)), .Names = c("site", "id", "cata", "catb", "doga", "dogb", "rata", "ratb", "bata", "batb"), row.names = c("aa&quo

Re: [R] Help with scatterplots in R

2010-07-28 Thread John Kane
I think that we need an example of what you are doing before anyone can really answer that question. At the moment we don't even know how you are plotting the scatterplot. --- On Wed, 7/28/10, Sarah Chisholm wrote: > From: Sarah Chisholm > Subject: [R] Help with scatterplots in R > To: "r-hel

Re: [R] save plot

2010-08-04 Thread John Kane
Yes, ?jpeg --- On Tue, 8/3/10, linda.s wrote: > From: linda.s > Subject: Re: [R] save plot > To: gavin.simp...@ucl.ac.uk > Cc: r-help@r-project.org > Received: Tuesday, August 3, 2010, 5:36 PM > > [I presume you addressed this to > Duncan Murdoch for a good reason???] > > > > Open a new device

Re: [R] colour of label points on a boxplot

2010-08-05 Thread John Kane
It would really help if you could reduce the information below to a small reproducible example, that is, some small bit of code that a reader can paste into R and poke around at. For sending a small sample dataset have a look at ?dput I believe that this problem has been discussed on the R-he

Re: [R] a question about 'read.table' with or without 'read.table'.(urgent)

2010-08-05 Thread John Kane
I believe Wu Gong has given you a solution. As a note you were probably reading in the first two columns as either factors or characters and the last one as numeric. You might want to try it again and then do a str() on the resulting data.frame to see what was happening. It can be confusing

Re: [R] odfWeave

2010-08-31 Thread John Kane
It looks like a path problem. I have not figured out how to handle it in Win 7 (new system last week) but have a look at http://r.789695.n4.nabble.com/odfWeave-Error-td1595848.html#a1595848 which I think addresses the problem. --- On Tue, 8/31/10, Michael Kubovy wrote: > From: Michael Kubovy

Re: [R] odfWeave

2010-08-31 Thread John Kane
Replying to my own post, it is a path problem. I downloaded the UnZip and Zip binaries, the 5.51-1 UnZip and the most recent Zip and then added a path to the UnZip directory, and odfWeave seems to be working. --- On T>e, 8/31/10, John Kane wrote: > From: John Kane > Subjec

Re: [R] how to represent error bar in a plot legend?

2010-09-01 Thread John Kane
Can you give us a working example of what you are doing? I don't understand why you would need a pch symbol for an error bar. Perhaps if you are using an unboxed legend you could just use arrow() and text() to add the error bar to the legend? --- On Wed, 9/1/10, josef.kar...@phila.gov wrote:

Re: [R] Function Gini or Ineq

2010-09-03 Thread John Kane
You installed the package but probably forgot to load the library. This works fine for me. = library(reldist) x<-c(541, 1463, 2445, 3438, 4437, 5401, 6392, 8304, 11904, 22261) G<-gini(x) ===

Re: [R] how can I plot bar plots with all the bars (negative and positive) in the same direction????

2010-09-03 Thread John Kane
I believe that you will have to draw them in ggplot2 as someone mentioned or in base graphics. Here is a rough first attempt that may give you some ideas. xx <- -3:4 yy <- rep(-3,length(xx)) plot(xx,xx, type="n", xlim=c(-4, 5)) rect(xx, yy, xx+.5, xx ) ==

[R] Cannot read in a csv file.

2011-05-07 Thread John Kane
Can anyone suggest why this file http://www.mediafire.com/?afeyhhpacaq is refusing to open for me.? I must admit I don't know all its history but the original data was taken from an OOo spreadsheet that I edited (good bit of copying and pasting and the month variable added by hand in OOo Calc)

Re: [R] Cannot read in a csv file.

2011-05-07 Thread John Kane
--- On Sat, 5/7/11, Duncan Murdoch wrote: > From: Duncan Murdoch > Subject: Re: [R] Cannot read in a csv file. > To: "John Kane" > Cc: r-help@r-project.org > Received: Saturday, May 7, 2011, 4:20 PM > On 11-05-07 1:26 PM, John Kane > wrote: > > C

Re: [R] how to calculate the mean of a group in a table

2011-05-08 Thread John Kane
I see you already have three solutions but, just for the heck of it, here's another. I am trying to get familiar with the reshape2 package and your question was a good exercise for me. With your data set named xx: library(reshape2) yy <- melt(xx, id=c("period", "treatment", "session", "

Re: [R] Setting NA to blank

2011-05-09 Thread John Kane
(mat <- matrix(c(1,2,3,NA),2)) mat[is.na(mat)] <- " " mat But if you have a numerical matrix it coverts the matrix to character. --- On Mon, 5/9/11, Dat Mai wrote: > From: Dat Mai > Subject: [R] Setting NA to blank > To: r-help@r-project.org > Received: Monday, May 9, 2011, 2:46 PM > Hey A

Re: [R] How to extract information from the following dataset?

2011-05-12 Thread John Kane
? subset day = x time > y | time < z --- On Thu, 5/12/11, hwright wrote: > From: hwright > Subject: Re: [R] How to extract information from the following dataset? > To: r-help@r-project.org > Received: Thursday, May 12, 2011, 6:18 AM > > I have the following data set, in a csv file, looks lik

[R] Simple order() data frame question.

2011-05-12 Thread John Kane
Clearly, I don't understand what order() is doing and as ususl the help for order seems to only confuse me more. For some reason I just don't follow the examples there. I must be missing something about the data frame sort there but what? I originally wanted to reverse-order my data frame df1

Re: [R] Simple order() data frame question.

2011-05-12 Thread John Kane
Ah, this never would have occured to me. It's rather obvious now but of course, I'll forget it again. Note to self: Put it in the cribsheet. Thanks very mcuy --- On Thu, 5/12/11, Nick Sabbe wrote: > From: Nick Sabbe > Subject: RE: [R] Simple order() data frame question. &

Re: [R] Simple order() data frame question.

2011-05-12 Thread John Kane
frame question. > To: "John Kane" > Cc: "R R-help" > Received: Thursday, May 12, 2011, 8:44 AM > On 05/12/2011 08:32 AM, John Kane > wrote: > > Clearly, I don't understand what order() is doing and > as ususl the help for order seems to only confuse me

Re: [R] Simple order() data frame question.

2011-05-12 Thread John Kane
.. > I was wondering whether it would be possible to make a > method for > data.frame with sort(). > I think it would be more intuitive than using the complex > construction > of df[order(df$a),] > Is there any reason not to make it? > > Ivan > > Le 5/12/2011 15:40

[R] Change font size in Windows

2011-05-12 Thread John Kane
My day for dumb questions. How do I increase the type size in the Rgui console in Windows? (R-2.13.0, Windows 7) It looked to me that I just needed to change the font spec in Rconsole but that does not seem to be working. The R FAQ for Windows has a reference in Q3.4 to changing fonts, (Q5.2),

Re: [R] Change font size in Windows

2011-05-12 Thread John Kane
Definitely. I edited the one in the program files. I think i saw a ref to the home file but it did not sink in. Thanks --- On Thu, 5/12/11, Uwe Ligges wrote: > From: Uwe Ligges > Subject: Re: [R] Change font size in Windows > To: "John Kane" > Cc: "R R-help&quo

Re: [R] Change font size in Windows

2011-05-12 Thread John Kane
--- On Thu, 5/12/11, Greg Snow wrote: > From: Greg Snow > Subject: RE: [R] Change font size in Windows > To: "John Kane" , "R R-help" > Received: Thursday, May 12, 2011, 1:07 PM > One simple way: > > Run R (the gui version) > Click on the Edit menu &

Re: [R] Assistance R

2011-05-12 Thread John Kane
As Alexander Engelhardt says we need more information/ Please give us the code you are using and a sample of the data. However one thing you might want to do is check that the seperetor is for the data. You may be reading something like tab delimited data when you think it is comma delimited.

Re: [R] Quick question: Omitting rows and cols with certain percents of missing values

2011-05-13 Thread John Kane
--- On Fri, 5/13/11, Vickie S wrote: > From: Vickie S > Subject: [R] Quick question: Omitting rows and cols with certain percents of > missing values > To: r-help@r-project.org > Received: Friday, May 13, 2011, 9:42 AM > > Hi > naive question. > It is possible to get R command for omitting

Re: [R] More effective calculation for loop

2011-05-13 Thread John Kane
What is xts? What package? --- On Fri, 5/13/11, Wolfgang Wu wrote: > From: Wolfgang Wu > Subject: [R] More effective calculation for loop > To: R-help@r-project.org > Received: Friday, May 13, 2011, 5:32 AM > I am getting confused in how to use R > effectively. Below is the example that I > w

Re: [R] Uploading CSV file into R

2011-05-14 Thread John Kane
--- On Fri, 5/13/11, Me wrote: > From: Me > Subject: Re: [R] Uploading CSV file into R > To: r-help@r-project.org > Received: Friday, May 13, 2011, 10:25 PM > OK, I have another question if you > guys don't mind helping again. I have all > of the information I need in a csv file, and I've read

Re: [R] (no subject)

2011-05-14 Thread John Kane
--- On Sat, 5/14/11, Ramnath R wrote: > From: Ramnath R > Subject: [R] (no subject) > To: r-help@r-project.org > Received: Saturday, May 14, 2011, 9:45 AM > Can any one help me where i can find > small standalone R programs that do > things like > scatterplot, mean/median, kernel density estim

Re: [R] Adding same items together in data.frame

2011-05-14 Thread John Kane
And another approach: = library(reshape2) mydata <- data.frame(aa = sample(Cs(a,b,c,d,e),10,replace=TRUE), bb = sample(1:10, 10, replace=TRUE)) (m1 <- melt(mydata)) =

Re: [R] Minimum value by ID

2011-05-17 Thread John Kane
A bit convolulted but it works library(reshape2) yy <- melt(dat) zz <- cast(yy, id.var ~ variable, min) zz[,2] --- On Tue, 5/17/11, Downey, Patrick wrote: > From: Downey, Patrick > Subject: [R] Minimum value by ID > To: r-help@r-project.org > Received: Tuesday, May 17, 2011, 9:44 AM > Hello, >

Re: [R] Adding a numeric to all values in the dataframe

2011-05-20 Thread John Kane
I didn't quite understand your first post. Was it intended to assure that the operation was only on numeric variables? Otherwise I don't see the differnce in applying the operation to a totally numeric data.frame and a matrix. -- On Fri, 5/20/11, bill.venab...@csiro.au wrote: > From: bill.v

Re: [R] Adding a numeric to all values in the dataframe

2011-05-21 Thread John Kane
--- On Fri, 5/20/11, David Winsemius wrote: > From: David Winsemius > Subject: Re: [R] Adding a numeric to all values in the dataframe > To: "John Kane" > Cc: bill.venab...@csiro.au, ramya.vict...@gmail.com, r-help@r-project.org > Received: Friday, May 20, 2011, 10:1

Re: [R] plotting single variables common to multiple data frames

2011-05-24 Thread John Kane
None of the files came through.  The R-help list routinely srips off all attachments to cut down on the change of viri .  You could provide the data in the email by using dput.  Type ?dput in the R console to get the help page. It is not clear from what you write whether you want a line with o

Re: [R] Item analysis

2011-06-10 Thread John Kane
Here are two different ways with your data as the data.frame xx # Basic R aggregate(xx$Tip, list(xx$Time), sum) # Using the rshape package library(reshape2) yy <- melt(xx, id=c("Time"), measure.vars=c("Tip")) dcast(yy , Time ~ variable , sum) --- On Thu, 6/9/11, Trying To learn again wrote:

Re: [R] / Operator not meaningful for factors

2010-05-04 Thread John Kane
--- On Tue, 5/4/10, Petr PIKAL wrote: > From: Petr PIKAL > Subject: Re: [R] / Operator not meaningful for factors > To: "John Kane" > Cc: r-help@r-project.org, "vincent.deluard" > Received: Tuesday, May 4, 2010, 3:38 AM > Hi > > r-help-boun...@r-

Re: [R] What is the best way to have "R" output tables in an MS Word format? (shaping R core)

2010-05-07 Thread John Kane
For simply doing tables xtable has done some nice work for me. --- On Fri, 5/7/10, Joris Meys wrote: > From: Joris Meys > Subject: Re: [R] What is the best way to have "R" output tables in an MS Word > format? (shaping R core) > To: "Duncan Murdoch" > Cc: r-h...@stat.math.ethz.ch > Received:

Re: [R] What is the best way to have "R" output tables in an MS

2010-05-07 Thread John Kane
Let me see. I open a Word document and type, Dear Dr.Harrell, I open a new LaTeX document and type something like: \documentclass[10pt,a4paper]{letter} \usepackage[latin1]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \address{your name and address} \signature{your s

Re: [R] Removing points

2010-05-12 Thread John Kane
?subset --- On Wed, 5/12/10, Blue.Egg wrote: > From: Blue.Egg > Subject: [R] Removing points > To: r-help@r-project.org > Received: Wednesday, May 12, 2010, 8:33 AM > > I have a some data, and imagine a column of how many > parasitic eggs found in > the stool of some children some of the child

<    6   7   8   9   10   11   12   13   14   15   >