search for: brown_emu

Displaying 18 results from an estimated 18 matches for "brown_emu".

2007 Jul 24
1
Fwd: Re: Fitting exponential curve to data points
...lm()? I show the use of a 2nd order polynomial as an example to generalize a bit. Sometimes from the subject line two separate responses can appear as reposts when in fact they are not... (though there are identical reposts too). I should probably figure a way around that. --- Stephen Tucker <brown_emu at yahoo.com> wrote: > ## Data input > input <- > "Year Count > 1999 3 > 2000 5 > 2001 9 > 2002 30 > 2003 62 > 2004 154 > 2005 245 > 2006 321" > > dat <- read.table(textConnection(input),header=TRUE) > dat[,] <- lapply(dat,function(x...
2009 Feb 20
2
importing data to SQLite database with sqldf
Hi all, I am attempting to learn SQL through sqldf... One task I am particularly interested in is merging separate (presumably large) files into a single table without loading these files into R as an intermediate step (by loading them into SQLite and merging them there). Taking a step back, I've considered these alternatives: 1) I know if I use straight SQLite commands I might use the
2008 Aug 01
1
chron objects: input/output
Hi list, I have some questions regarding 1) conversion of date + time characters to chron 2) formatting chron object printing Regarding (1), Gabor's Rnews 2004 4/1 article has been indispensible, but I often work with files where dates and times are contained in a single field. In this case, I would like to control input/output of chron objects when each observation of date and time is
2007 Jul 14
1
scaling of different data sets in ggplot
Dear list (but probably mostly Hadley): In ggplot, operations to modify 'guides' are accessed through grid objects, but I did not find mention of creating new guides or possibly removing them altogether using ggplot functions. I wonder if this is something I need to learn grid to learn more about (which I hope to do eventually). Also, ggplot()+geom_object() [where 'object' can be
2008 Sep 19
2
plot order in multi-panel figure
Hi, Does anyone know if there is a way to 'reset the plot number' on a traditional graphics device? For instance, I want to have two plots on stacked top of each other (mfrow=c(2,1)) but with underlying grid lines spanning both figures vertically. I can put the grid lines on top if I add them last: par(mfrow=c(2,1)) plot.new() plot.window(c(0,1),c(0,1)) for( i in 1:2) axis(i)
2007 Jul 22
2
Data Set
Hi Sir I have made a data set having 23 stations of rainfall. when I use the attach function to approach indevidual stations then following error occurr. *>attach(data)* *>S.Sharif #S.Sharif is the station name which has 50 data values* *Error: object "S.Sharif" not found* Now how to solve this problem. Thank You Regards -- AMINA SHAHZADI Department of Statistics GC
2009 Aug 27
3
Merge data frames but with a twist.
Dear all, Question: How to merge two data frames such that new column are added in a particular way? I'm not actually sure how to best articulate my question to be honest, so i hope showing you what I want to achieve will communicate my question better. Lets say I have two data frames: > DF1 <- data.frame(cbind(Show=c('Firefly', 'Red Dwarf'), Measure=1:2,
2007 Feb 18
0
Lattice graphics: minor tick marks and panel.axis() question(s)
Hello, I have been a long-time Traditional graphics user and now moving to try Lattice graphics. At the moment I cannot figure out how to place minor tick marks in a figure made with Lattice's xyplot(). In Traditional graphics, after calling plot() I would make two calls to axis(). >From the manuals and help documentation I learned that 'scales' takes multiple 'at'
2007 Jul 29
1
line widths of plotting symbols in the lattice
Dear List, Sorry, this is very simple but I can't seem to find any information regarding line widths of plotting symbols in the lattice package. For instance, in traditional graphics: > plot(1:10,lwd=3) > points(10:1,lwd=2,col=3) 'lwd' allows control of plotting symbol line widths. I've tried looking through the documentation for xyplot, panel.points, trellis.par.set,
2009 Apr 02
0
R_LIBS in Windows Vista
Hello, I am trying to install R and have it running through ESS on a Vista machine that is not mine (I am only familiar with Windows XP and Ubuntu Linux) so please pardon my unfamiliarity... The Rgui.exe installation works fine and package installation also appears to work fine. The base packages are installed in C:/Program Files/R/R-2.8.0/library/ and user-installed packages are installed in
2010 Feb 10
0
Compose in roxygen - order of function application?
Hello, I wonder if anyone has used the Compose() function in the 'roxygen' package. I find its behavior a bit surprising: > f <- function(x) x + 1 > g <- function(x) x * 2 > f(g(2)) [1] 5 > Compose(f,g)(2) [1] 6 > g(f(2)) [1] 6 > Compose(g,f)(2) [1] 5 I would have expected Compose(f,g)(x) == f(g(x)) but it appears the order of application is reversed. It would be
2007 Apr 25
1
regular expressions with grep() and negative indexing
Dear R-helpers, Does anyone know how to use regular expressions to return vector elements that don't contain a word? For instance, if I have a vector x <- c("seal.0","seal.1-exclude") I'd like to get back the elements which do not contain the word "exclude", using something like (I know this doesn't work) but: grep("[^(exclude)]",x) I
2009 Mar 03
1
behavior of squishplot in TeachingDemos
Hi list, I wonder if anyone has had this experience with squishplot() in the TeachingDemos package. Taking the example from the ?image help page, library(TeachingDemos) x <- 10*(1:nrow(volcano)) y <- 10*(1:ncol(volcano)) layout(matrix(c(1,2,3,4),ncol=2,byrow=TRUE),height=c(2,1)) ## 1st plot op <- squishplot(range(x),range(y),1) image(x, y, volcano, col = terrain.colors(100)) par(op)
2008 Jun 13
1
adding custom axis to image.plot() and strange clipping behavior
Hi list, I wanted to plot an image with a colorbar to the right of the plot, but set my own axis labels (text rather than numbers) to the image. I have previously accomplished this with two calls to image(), but the package 'fields' has a wrapper function, image.plot(), which does this task conveniently. However, I could not add axes to the original image after a call to image.plot(); I
2007 Jun 13
1
passing (or obtaining) index or element name of list to FUN in lapply()
Hello everyone, I wonder if there is a way to pass the index or name of a list to a user-specified function in lapply(). For instance, my desired effect is something like the output of > L <- list(jack=4098,sape=4139) > lapply(seq(along=L),function(i,x) if(i==1) "jack" else "sape",x=L) [[1]] [1] "jack" [[2]] [1] "sape" >
2010 Feb 17
1
side-effects in functions that replace object values and attributes
Hello list, I encountered some surprising behavior in R and wanted to check to see if I was imagining things. Previously, I thought that replacement/setter operators in prefix notation (e.g., `[<-`(x,1,y) rather than x[1] <- y) did not produce side effects (i.e., left 'x' unchanged), but just realized that this is not the case anymore (or has it always been this way? - I don't
2007 Mar 23
1
objects of class "matrix" and mode "list"?
Hello everyone, I cannot seem to find information about objects of class "matrix" and mode "list", and how to handle them (apart from flattening the list). I get this type of object from using sapply(). Sorry for the long example, but the code below illustrates how I get this type of object. Is anyone aware of documentation regarding this object? Thanks very much, Stephen
2008 Jul 27
2
Colors in Sweave
Hi list, I was using Sweave and was wondering if anyone has had any luck changing the font colors of the code chunks. For instance, in my .Rnw preample I tried including: === \usepackage[usenames]{colors} \definecolor{darkred}{rgb}{0.545,0,0} \definecolor{midnightblue}{rgb}{0.098,0.098,0.439} \DefineVerbatimEnvironment{Sinput}{Verbatim}{fontshape=sl,formatcom={\color{midnightblue}}}