similar to: Generating maps in R

Displaying 20 results from an estimated 300 matches similar to: "Generating maps in R"

2011 Jan 26
1
aggregate(as.formula("some formula"), data, function) error when called from in a function
I'm having a problem with aggregate.formula when I call it in a function and the function is converted from a string in the funtion I think my problem may also only occur when the left hand side of the formula is cbind(...) Here is example code that generates a dataset and then the error. The first function "agg2" fails > agg2(FALSE) do agg 2 Error in m[[2L]][[2L]] : object
2012 Jun 05
4
need descriptive help
Hi all, I'm new to using R, and apologize for simplicity of this question. I'm using a data set with over 60,000 observations, Two variables are patient ID, and cost incurred by the patient. I'd like to generate frequency/table by patient and cost IF the total cost is over 2000. Right now I'm using: by(x$cost, x$patient, sum) but this generates a huge list for each patient.
2012 Sep 07
7
Producing a table with mean values
Hi All, I have a data set wit three size classes (pico, nano and micro) and 12 different sites (Seamounts). I want to produce a table with the mean and standard deviation values for each site. Seamount Pico Nano Micro Total_Ch 1 Off_Mount 1 0.0691 0.24200 0.00100 0.31210 2 Off_Mount 1 0.0938 0.00521 0.02060 0.11961 3 Off_Mount 1 0.1130 0.20000 0.06620 0.37920 4 Off_Mount 1
2009 Feb 05
3
maptools: Test if point is in polygon
In R's maptools package, is there a built-in function to test if a given point is "inside" a given polygon on the map? The map was loaded from an ESRI Shapefile. The point's latitude and longitude are known. Thank you! Aleks -- ------------------------ Aleksandr Andreev Fulbright Fellow Graduate School of Management St Petersburg State University
2010 Nov 10
2
maptools package
A few years back, I wrote some code to plot maps with the maptools package. Now I am trying to reproduce my results, only to find out that maptools has been updated and my code no longer works. I've been able to fix the first part of it by forcing spb <- maptools:::read.shape("/home/sasha/Documents/maps/spb.shp") (as read.shape has been deprecated) but now when I do plot(spb,
2011 Jul 14
2
cbind in aggregate formula - based on an existing object (vector)
Hello! I am aggregating using a formula in aggregate - of the type: aggregate(cbind(var1,var2,var3)~factor1+factor2,sum,data=mydata) However, I actually have an object (vector of my variables to be aggregated): myvars<-c("var1","var2","var3") I'd like my aggregate formula (its "cbind" part) to be able to use my "myvars" object. Is it
2007 Dec 16
2
question about the aggregate function with respect to order of levels of grouping elements
Hi, I am using aggregate() to add up groups of data according to year and month. It seems that the function aggregate() automatically sorts the levels of factors of the grouping elements, even if the order of the levels of factors is supplied. I am wondering if this is a bug, or if I missed something important. Below is an example that shows what I mean. Does anyone know if this is just the way
2012 May 08
2
How to deal with a dataframe within a dataframe?
Hello all, I am doing an aggregation where the aggregating function returns not a single numeric value but a vector of two elements using return(c(val1, val2)). I don't know how to access the individual columns of that vector in the resulting dataframe though. How is this done correctly? Thanks, robert > agg <- aggregate(formula=df$value ~ df$quarter + df$tool, + FUN=cp.cpk,
2010 Jan 26
1
Maptools runs out of memory installing the help files for spCbind-methods
Hi, I'd be grateful for help with the following:- Running R version 2.9.2 (2009-08-24) on Gentoo Linux, on an x86 PC. I am trying to install maptools, (via CRAN from maptools_0.7-29.tar.gz'), for the first time. All runs smoothly until the installation gets to "*** installing help indices" for spCbind-methods, about two thirds of the way through the help files, at which point
2005 Feb 03
2
Compile without OGG support?
Hi, I need to compile Icecast on a kind of ancient AIX machine. I compiled all the required libraries, except libvorbis, and I can't make it compile at all. Is there a way to compile Icecast without Ogg Vorbis support? Thanks! -- Regards, Alek Andreev alek@zvuk.net
2005 Feb 07
2
Icecast dropping streams
Hi, I had my stream running from ezstream 0.1.2 to icecast 2.2.0. It's been going for about a week, but two days ago I changed my icecast.xml. Since then, Icecast dropped my sources and stopped transmission twice. Everytime, it spew out xmlEncodeEntitiesReentrant : char out of range on STDERR and [2005-02-07 01:14:47] WARN source/get_next_buffer Disconnecting source due to socket
2008 Feb 07
6
Buffer flushing
Short question: is there way to tell EM to actually send data after send_data call? I''m building a file transferring app. I send Mashal.dump''ed metadata first, and then - the file contents (chunked). I found a silly bug: receive_data() gets marshalled metadata and the first chunk of the file in a single variable. Like that: c1.send_data("meta")
2024 Feb 28
1
About timestamps in logs and zonestatus
Hi Jeroen, I just realised that the version I use is very old -- 4.1. So first what I should do -- updating it and only then come here , asking for clarification. ??, 27 ????. 2024??. ? 14:19, Jeroen Koekkoek <jeroen at nlnetlabs.nl>: > Hi Peter, > > NSD processes updates in batches. xfrd receives the [AI]XFR and > schedules a reload for the main process, which in turn forks
2011 Apr 18
1
using "aggregate" when variable names contain spaces
Hello! my data set has many variables. Unfortuantely, many of those variables contain spaces in their names. I need advice on: how to refer to variable names in the formula for "aggregate". See example below: ### Generating example data set: mydate = rep(seq(as.Date("2008-12-01"), length = 3, by = "month"),4) value1=c(1,10,100,2,20,200,3,30,300,4,40,400)
2009 Oct 28
2
Re ading and Creating Shape Files
Hello R Community, I have imported a dataset which contain X Y coordinates and would like to recreate a shape file after some data analysis. What i have done is to import some taxlot data and join them based on some criteria. I want to check to see how well the joining went by reviewing the results in GIS. A couple things. I cant seem to import a shape file correctly using the maptools
2024 Feb 27
2
About timestamps in logs and zonestatus
Dear All, Please help me understand why timestamps in logs are different from those in nsd-control zonestatus output: served-serial: "2024022603 since 2024-02-27T08:07:51" commit-serial: "2024022603 since 2024-02-27T08:07:51" Feb 26 18:47:34 slave-server nsd[780]: zone testzone.test. received update to serial 2024022603 at 2024-02-26T18:47:33 from
2010 Jan 29
1
Compilation error with maptools
I had downloaded and installed a number of packages, successfully, when I ran into some problem with maptools: It would eat up CPU and most of all memory. I rebooted, and tried again, only running the terminal after the reboot; with the same result: " sp2WB text html latex example sp2tmap text html latex example spCbind-methods text html latex example Out of memory! ERROR: building help
2008 May 26
1
read.dta error
Greetings! I attempted to read a STATA 10 file using the following syntax: library(foreign) data <- read.dta("~/Documents/agestandard/analysis.dta") I got the following error: *** stack smashing detected ***: /usr/lib/R/bin/exec/R terminated ======= Backtrace: ========= /lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb7c13138]
2014 Oct 08
3
Pregunta sobre manipulación de shapefile
Hola buenos días: Hace algún tiempo mandé una duda que sobre fichero tipo shapefile que publica el Instituto Geográfico Nacional de España y que detallo en el word Duda_sobre_shp. El tema es que al final no obtuve respuesta (es cierto que lo mandé en Agosto y en esa fechas entiendo que sea normal, por tanto por recomendación de un conocido vuelvo de nuevo a remitir la cuestión) Como no podía
2014 Oct 08
2
Pregunta sobre manipulación de shapefile
Oscar, al final no he podido esperar hasta mañana Con: library(maptools)library(sp) poligonos <- readShapeLines("C:\\...\\DATOS\\MUNICIPIO.shp") sink("C:\\ ... \\DATOS\\MUNICIPIO.csv") coordinates(poligonos) Consigo un fichero con la suficiente estructura para tratarlo fácilmente y de una tacada montar la tabla .csv tal y como he indicado en un correo anterior Necesito el