Displaying 20 results from an estimated 9000 matches similar to: "Questions about imports to a namespace"
2010 Jun 09
1
[R-sig-Geo] How to extract coordinates values from a shapefile?
I'm not sure if this is what you want. But the function coordinates() in sp
package gives you the coordinates of SpatialObjects.
Regards.
Rodrigo.
2010/6/9 Nikhil Kaza <nikhil.list@gmail.com>
> You need to execute gpclibPermit() to enable gpclib.
>
> library(maptools) should have issued a warning to that effect.
>
>
> Nikhil Kaza
> Asst. Professor,
> City and
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)
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
2013 Jun 05
1
conflicting imports despite using importFrom in NAMESPACE
Dear all,
It is my understanding that using 'importFrom' in the NAMESPACE of a package allows to avoid conflicts between different packages defining objects with identical names. However, I can still see conflicts while loading the package using 'library'.
Here is a toy example, with a package 'foo' importing 'as.igraph' from the igraph package, and 'nj'
2013 Jan 29
1
points rejected as lying outside the specified window
Hello,
I am using the following code to create ppp files from csv data and map shape files, but I am getting some errors which I have been unable to fix by searching them online:
library(spatstat)
library(maps)
library(maptools)
NYC2<-readShapePoly("nybb.shp") # this is a map of the NYC boroughs without waterways and no census tract divisions (but it does include lines separating
2013 Jun 06
1
Error invalid graphics state using text()
I'm using ssplot for drawing a map of Austria and colour the nine provinces
regarding their share of employment. Now I wanted to add the figures in each
province and failed miserably. Using the locator() and text() function
caused the error message "invalid graphics state". I try to show you what I
have done below, maybe you can find a general fault in my codes. I know that
it's
2006 Oct 18
1
conversion of LL coordenates to UTM problems (ED50-WGS84 format)
Hi R-Users,
I have plotted a region whose polygon coordinates are given in shp format ED50 UTM (zone=30) ) using "readShapePoly" in library(maptools).
Now I need to plot a set of points in that region (my.dataframe, with X and Y geographic coordinates), which have been read using GPS in Longitud-Latitud form (using WGS84 system), so I first need to convert these Longitud-Latitud data
2011 Jul 22
1
Start-up messages when Importing from a package
Dear List,
I'm building a package that uses 2 functions of the 'sp' package, and I
declared them in my NAMESPACE file as follow:
importFrom("sp", proj4string, coordinates)
The package is built without any problem, but when I load the package, I
get the following message:
"
Loading required package: sp
Note: polygon geometry computations in maptools
2005 Sep 16
1
Question:manipulating spatial data using combination of Maptools and Splancs
Hi,
I have a problem that concerns combination of the package Maptools and
Splancs
I have 2 shapefiles that i want to manipulate (one of type point and one
polygon).I import them in R using Maptools but then i can't estimate a
quartic Kernel using Splancs. The package doesn't recognize the shapes
(invalid points and poly argument).I don't know if this is an easy task but
i have
2014 Oct 08
4
Pregunta sobre manipulación de shapefile
Gracias Beatriz, efectivamente, lo que indicas en tu ejemplo es lo que obtengo al final de mi proceso.
En todo caso pruebo tu opción con mis datos, si es como imagino seguro que es más rápida de montar y más elegante que tratar el resultado de un sink() (recuerdo que en su momento lo intenté con fotify pero no supe bien como atacarlo, no conocía el enlace que me mandas, por tanto lo pruebo de
2011 Dec 15
1
S4 NAMESPACE method imports and exports do not include (promoted?) generics
In
> R.version.string
[1] "R Under development (unstable) (2011-12-15 r57901)"
section 1.6.6 of 'Writing R Extensions' says
Note that exporting methods on a generic in the namespace will
also export the generic, and exporting a generic in the
namespace will also export its methods.
and
Note that importMethodsFrom will also import any generics defined in
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,
2012 Mar 18
1
Namespace dependency not required
Hi,
I am working at adding namespace to my packages, carefully following the
doc "Writing R extensions" and some threads on the web. However I cannot
find clear explanation about how to best deal with the import or
importFrom functions in the name space. To make it short:
To declare dependencies in the description file either after Depends:
(packages including functions that are
2013 Apr 19
2
NAMESPACE and imports
I am cleaning up the rms package to not export functions not to be called
directly by users. rms uses generic functions defined in other packages.
For example there is a latex method in the Hmisc package, and rms has a
latex method for objects of class "anova.rms" so there are anova.rms and
latex.anova.rms functions in rms. I use:
2007 Sep 17
1
map issues
Hi !
I have a shapefile that I can easily read into R using library(maptools). My problem stems from some warning messages that come even though everything seems to work fine.
library(maptools)
districts <- read.shape(filen = "a_ds", dbf.data = TRUE)
length(districts$Shapes)
so far so good. when I try and plot this I get a nice plot and a warning message:
> plot(districts)
2018 Mar 13
2
importing namespaces from base packages
On Mon, Mar 12, 2018 at 2:18 PM, Martin Maechler <maechler at stat.math.ethz.ch>
wrote:
> [...]
> Is that so? Not according to my reading of the 'Writing R
> Extensions' manual, nor according to what I have been doing in
> all of my packages for ca. 2 years:
>
> The rule I have in my mind is
>
> 1) NAMESPACE Import(s|From) \
>
2009 Sep 10
1
importing/loading package without a namespace
I am developing a package that imports some functions from another package.
The imported package (qcc) does not have a namespace and this is causing
problems with loading of my package, which has a namespace. Is there a
workaround to allow loading the namespace-less package?
I searched the archives and found a suggestion that the package should be
included in the Depends list, but this has not
2004 Oct 17
2
Errors while compiling packages with namespace?
Hello,
I try to set up namespaces for packages. It is fine for several of them,
except one whose compilation fails (under Windows XP & R 2.0.0):
---------- Making package svViews ------------
adding build stamp to DESCRIPTION
installing NAMESPACE file and metadata
Error in parse(file, n, text, prompt) : syntax error on line 21
Execution halted
make[2]: *** [nmspace] Error 1
make[1]: ***
2012 Nov 06
2
Question on callNextMethod
I don't understand why I get the following results. I define two classes
'Base' and 'Derived', the latter of which 'contains' the first. I then
define a generic method 'test' and overload it for each of these classes. I
call 'callNextMethod()' in the overload for Derived. From the output, it
appears that the overload for Base gets called twice. Why is
2018 Mar 09
2
importing namespaces from base packages
Dear All,
I understand the R CMD checks with only the base package attached,
everything else (including the other packages bundled with the base R)
should be imported and most importantly declared in the Imports field from
the DESCRIPTION file.
However, I do use functions from other packages than base (utils,
grDevices, stats, graphics), for which it is sufficient to declare
importFrom() in the