Displaying 20 results from an estimated 1200 matches similar to: "Speed up graphics output?"
2004 Mar 31
4
Removing leading and trailing spaces (string manipulation)
Hi all,
I'm running the following code to generate 40 different jpegs based on the resulting data. I'd like the file names to be 'Cluster1.jpeg', however the code write filenames like 'Cluster 1 .jpeg'.
How can I get rid of the unwanted spaces? I've looked at ?format and it doesn't seem to work - at least in this context.
###################
ClusCount <- 40
2015 Oct 20
2
Crear variable con condiciones
Buenas tardes a todos,
Quisiera crear una variable de acuerdo a ciertas condiciones. Me gustaria
llegar de "datain" a "dataout".
## entrada
datain <- structure(list(REF = c("999", "999", "999", "1099", "731", "731",
"731", "731", "1442", "1442", "1442",
2012 Apr 22
2
difficulty in Formatting time series data
Dear R-Gurus
I have a data frame (from CSV file) which has its first column called Date.
The Date is in the format mm/dd/yyyy. I was trying to get the weekday for
these dates and I tried using wday() and day.of.week() functions and both
of them gave me precisely the wrong answers. I think the issue lies in the
proper formatting of dates. The class of this column is a factor class and
hence I
2015 Oct 21
3
Crear variable con condiciones
Muchas gracias Javier por tu respuesta.
Si. Para obtener "dataout" se utilizan filas anteriores de acuerdo con la
disponibilidad de la variable TOENDREF para cada valor de la variable REF.
Por ejemplo, las filas 3 y 4 de "datain" son
#REF TIMEREF TOENDREF
#3 999 360 150
#4 1099 30 480
En la fila 3, el valor de TOENDREF es 150. Esto indica que hay 150
2011 Jan 31
2
Storing loop output in matrix
Hello
I am trying to store output from a loop into an empty matrix. The
current code I am using is:
> M<-mat.or.vec(11,89)
> for (j in list(3,91))
+ {M[,(j-2)]<-pic(datain[,j], mytree)}
datain is a matrix (11,91). I only want to use the pic() function on
the columns 3:91.
When I use this code output is stored into the 1st column of M and the
89th column of M but no other columns.
Any
2010 Feb 16
0
Strange routing(?) Issue
I have a Model event and the following two lines in routes.rb
1 - map.connect "events/:action", :controller => ''events'', :action => /
[a-z_]+/i
2 - map.resources :events, :has_many => :comments, :has_one
=> :address #, :collection => {:mapit => :get}
I have #1 so that I can call custom actions from a link_to_remote link
from my index page t0 update a
2006 Feb 10
0
- Function to export files
Hi all,
I've done a simple function for import files but can't do the same think
for export files.
Could you help me solve it?
Thanks in advance for your cooperation.
wd<-"C:\\Teste"
import<-function(wd0){
wd1<-paste(wd,wd0,"Input\\.", sep = "\\")
d<-read.table(choose.files(default = wd1, caption =
2006 Nov 30
2
*** caught segfault *** error
Dear R users,
I use R 2.4.0 on an iMac running Mac OS X 10.4.8, with a 2.16GHz
Intel Core 2 Duo and 2GB 667 MHz DDR2 SDRAM.
> sessionInfo()
R version 2.4.0 (2006-10-03)
i386-apple-darwin8.8.1
locale:
es_ES.UTF-8/es_ES.UTF-8/es_ES.UTF-8/C/es_ES.UTF-8/es_ES.UTF-8
attached base packages:
[1] "methods" "stats" "graphics" "grDevices"
2004 Feb 26
1
writing polygons/segments to shapefiles (.shp) or other A rcGIS compatible file
The main limitation of the shapefiles package that I put together is that it
does not create shapefiles from R objects - rather it only writes shapefiles
that have been read into R and manipulated within the constraints of the
existing file structure. By this I mean that for example you can change the
coordinates of points and write them back out. Or you can add a bunch of
blank columns in the
2006 Oct 07
3
merge and polylist
Greetings:
I would like to kindly ask for a little help. The rough code is:
#________________________________________________________
dat=data.frame(read.delim(file="all.txt", header = TRUE, sep = "\t",
quote="\"", dec=".",na.strings = "NA"))
nc=read.shape("astae.shp", dbf.data=TRUE, verbose=TRUE)
mappolys=Map2poly(nc)
submap
2012 Oct 10
2
mapa municipios Andalucía con R
Hola a todos.
Estoy utilizando R , más concretamente los paquetes maptools y sp,
para realizar mapas de España por comunidades y provincias y de
Andalucía por provincias y municipios.
El caso es que para el mapa de municipios en Andalucía, una vez leído
el fichero shp con readShapePoly , si luego por ejemplo , quiero poner
todos los polígonos de un color utilizando
library(maps)
2005 Sep 06
0
Revised shapefiles package
Now available on CRAN is a revised version of the shapefiles package for
reading and writing shapefiles in R. New additions, courtesy of others,
include the ability to convert a simple R data frame of points,
polylines or polygons to a shp format list, which can then be written
out to a shapefile with write.shp. There is also a function to convert
the read.shp shp format list to a simple data
2007 May 21
1
Graphically show population density for a specific geographic area using R
Hi,
we all know that R is powerful in dealing with graphics.
I am now trying to use R to show some geographic attributes for a
specific geographic area on a graph. For example, if I would like to
generate a graph showing the population densities (in terms of the
intensity of colors) for Illinois State by zip codes. I did some
research; and it seems that package "maptools" is
2003 Oct 22
4
adjacency matrix
Dear R experts,
I am new to the list and R software. I need to convert arcview file to Winbugs having R has middle package. Got from friends that it is possible following the steps:
1. Converting arcview shapefile to "cgm clear text file"
2. Downloading "convert.r" to into R
2.1 use source("convert.r")
2.2 convert("filename_cgm") without the
2003 Jun 30
4
french map
Hello,
I would like to know if (as the usa map with Splus), it is possible with
R to plot the french map and to add points (representing towns for
instance) on the figure in the appropriate (x,y) system.
Thank you.
Nathalie Peyrard
2011 May 01
1
vector file
Dear All
I want to import the vector file ( .shp) to R. I could import the file by rgdal package before, by following:
geology<-readOGR('C:/geology//saga/geo.geom','finalgeology')
but now there is an error:
Error in ogrInfo(dsn = dsn, layer = layer, input_field_name_encoding = input_field_name_encoding) :
GDAL Error 4: .shx file is unreadable, or corrupt.
1999 Jul 28
1
ESRI shapes --again
thanks to all the help so far I have code now that works on windows
(albeit very clunky) that can read the pertinent info from the shape header
and return a list with all the necessary parameters to read info out of
the shape file. Now come the big design questions
1) I have considered building a map object, basically a list that would
hold the info from the shape file and a data frame as part of
2004 Feb 25
2
writing polygons/segments to shapefiles (.shp) or other ArCGIS compatible file
I am not sure a previous e-mail reached the list (no mail aknowledgement from R-boundle etc.). The question was how to write polygon
or segment coordinates into a shapefile set or any other ArcGIS supported format. The library shapefiles seems to do something but
the documentation is a bit beyond of my mind.... and I cannot get the meaning of the functions write**** and its application to the
case
2013 Jan 27
1
lapply and SpatialGridDataFrame error
Hi all, I have a set of 54 files that I need to convert from ASCII grid
format to .shp files to .bnd files for BayesX.
I have the following R code to operate on those files:
library(maptools)
library(Grid2Polygons)
library(BayesX)
library(BayesXsrc)
library(R2BayesX)
readfunct <- function(x)
{
u <- readAsciiGrid(x)
}
modfilesmore <- paste0("MaxFloodDepth_", 1:54,
2005 Sep 26
1
merge maps from shapefile to lattice
Hi everybody:
Could anybody help how I solve the next problem?.
I'm doing interpolation maps of tropospheric ozone of my region, and after
create it using IDW, and kriging methods, I want from shapefiles (*.shx,
*.shp, *.dbf, *.sbx & *.sbn ) create contour over the interpolation maps.
Could anybody tell me how do it?.
Thanks in advance.
######################################
Antonio