[R] A simple crop/clip of a png map

2015-10-30 Thread Jim Burke
I have a 5.76" x 5.75" png image which I would like to crop to some inch size. To use as a report header (after placing some title text on it). So how to use R to crop a nice rectangle from my image? Thanks for your thoughts Jim Burke [[alternative HTML versi

[R] My simple ORDER is broken

2015-10-26 Thread Jim Burke
rid of that NA? 2 2904 Open Seat 1015 3 2905 Open Seat 71 202 497 NA 2903 Open Seat227 245 2035 Thanks, Jim Burke [[alternative HTML version deleted]] ___

[R] Fwd: Text in Spatial Polygrams

2015-08-25 Thread Jim Burke
Setup for the OSM Map is below ul <- as.vector(cbind(bbox(all_pcts_osm_sp) [2,2], bbox(all_pcts_osm_sp) [1,1])) lr <- as.vector(cbind(bbox(all_pcts_osm_sp) [2,1], bbox(all_pcts_osm_sp) [1,2])) map_types <- c("osm", "maptoolkit-topo", "waze", "mapquest", "mapquest-aerial", "bing", "s

[R] Text in Spatial Polygrams

2015-08-25 Thread Jim Burke
]@labpt[[1]], all_pcts_osm_sp[i,]@polygons[[ 1 ]]@labpt[[2]] - (hght * 1.5 * seq(length(MyLines))), do.call(expression, MyLines)) } All your comments, ideas, and thoughts are appreciated. Thanks Jim Burke [[alternative HTML version deleted]] _

[R] aggravating aggregate

2015-08-05 Thread Jim Burke
th "R" does not appear to delve into "aggerate". Basic simple and useful fully explained answers. If you have to use "apply" then explain why. Thanks Jim Burke [[alternative HTML version deleted]] __ R-help@r-pr

[R] Trouble with simple R list concatenations

2011-03-20 Thread Jim Burke
PROBLEM How can I concatenate the following lists into ONE LIST WITHOUT the unhelpful message "operator is invalid for atomic vectors"? Combine as a data frame? EXAMPLE Birth_Date <- NULL Birth_Date[1:3] <- c("01/17/1939","01/17/1949", "01/17/1959") Later_Date <- NULL Later_Date[1:3

Re: [R] Lattice, combine histogram and line graph

2011-01-09 Thread Jim Burke
## See ?xyplot ?as.layer ?hist # for info about histograms HTH, Josh On Sun, Jan 9, 2011 at 5:13 PM, Jim Burke wrote: Hello everyone, I have a simple histogram of gasoline prices going back a few years that I want to insert a line graph of consumer price index (cpi) over the histogram.

[R] Lattice, combine histogram and line graph

2011-01-09 Thread Jim Burke
= gas_data, type = c("g", "h" )) Thanks, Jim Burke __ R-help@r-project.org 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, self-contained, reproducible code.

[R] Merge disparate lists

2010-10-27 Thread Jim Burke
My two lists look like below Need an R code example that combines the two. l_one "key" 2 1 2 l_two "ndx", "descr" 1, "this" 2, "that" 3, "other" 4, "finis" My goal is a new list that looks like below. ndx descr 2 that 1 this 2 that Thanks, Jim __

Re: [R] Problem installing new packages

2010-03-11 Thread Jim Burke
Never mind, thanks Jim Burke wrote: Hi everyone, Using R 2.10.1 on Windows Vista. DOWNLOADED PACKAGES DO NOT INSTALL. I expect to see them in C:\Program Files\R\R-2.10.1\library These files download (see below). And they are all in zip format. What am I doing wrong? Please help. All

[R] Problem installing new packages

2010-03-11 Thread Jim Burke
ps' successfully unpacked and MD5 sums checked package 'MEMSS' successfully unpacked and MD5 sums checked package 'mlmRev' successfully unpacked and MD5 sums checked package 'RColorBrewer' successfully unpacked and MD5 sums checked The downloaded packages are in

Re: [R] prompts and running means

2010-02-10 Thread Jim Burke
Perhaps the One R Tip a Day might be helpful. The first part of this example saves a png file. http://onertipaday.blogspot.com/2009/01/statistical-visualizations-part-2.html Good luck, Jim RagingJim wrote: Thanks mate, will get the zoo package ASAP. I have been working on the file open/save pa

Re: [R] Simple if else statement problem

2009-11-13 Thread Jim Burke
Anna, I think the else needs to be on the same line as the curly bracket like this "} else". P1 <- 1 P2 <- 2 if( P2 > P1) { P<-P2 } else { P<-P1 } Good luck, Jim anna_l wrote: Hello, I am getting an error with the following code: if( P2 > P1) + { + P<-P2 + } else Erro: unexpe

Re: [R] Turn dates into age

2009-11-08 Thread Jim Burke
To clarify. Lets turn a date into an age. Given 05/29/1971 in mm/dd/ format. What is the year difference between then and today? This would be the "age" requested that starts 05/29/1971 as one. Thanks, Jim David Winsemius wrote: > > On Nov 8, 2009, at 3:11 PM, frenchcr wrote: > >> >> >> w

Re: [R] "The system cannot find the file specified"

2009-10-29 Thread Jim Burke
I think your are using R 2.10.0. I get similar messages when I have too many resources in use. Like FireFox eating memory and CPU. When you get this message go look in your R installation "library" subdirectory. You will see a weird number as a folder name. Under that folder is the package you

[R] Basic simple question

2009-10-29 Thread Jim Burke
I have a statement like below. my_num <- c("101","102","103","104","105","107","108","112","113","114","115") "my_df" has 8,000 different STREPS in it. I have a statement where I can select ONE item from data frame "my_df" txhd_df <- prec_dist_df[ my_df$STREP=="101", c("COUNTY", "FIPS", "STS

Re: [R] Basic question ( too broad for help topics).

2009-10-29 Thread Jim Burke
;STREP", "PREC")] should do the trick. See ?match for details. On Thu, Oct 29, 2009 at 1:53 AM, Jim Burke wrote: I have searched help topics but don't know exactly what to search for. Need to use my_num to find any matching STREPs in my_df my_num <- c("101",

[R] Basic question ( too broad for help topics).

2009-10-28 Thread Jim Burke
I have searched help topics but don't know exactly what to search for. Need to use my_num to find any matching STREPs in my_df my_num <- c("101","102","103","104","105","107","108","112","113","114","115") ## "my_df" has 8,000 different STREPS in it. ## I have a statement where I can select