Displaying 7 results from an estimated 7 matches for "name_1".
Did you mean:
name1
2009 Sep 22
3
how to force R to evaluate variable?
Hi,
I want to construct a list as
Lst <- list(name_1=object_1, ..., name_m=object_m)
If name_1 is a variable with value "NAME1", how can I ask R to use
"NAME1" instead of 'name_1' as the name of the list element?
Thanks!
Yupu
[[alternative HTML version deleted]]
2015 Apr 02
2
Mapas con spplot
Hola
He hecho el típico mapa con gadm y spplot:
library(sp)
ES <-
local(get(load(url("http://biogeo.ucdavis.edu/data/gadm2/R/ESP_adm2.RData
"))))
acerco las canarias:
A <- which(ES en data$NAME_1 == "Islas Canarias")
L <- length(ES en polygons[[A]]@Polygons)
L <- length(ES en polygons[[A]]@Polygons)
for (i in 1:L){
ES en polygons[[A]]@Polygons[[i]]@coords <- cbind(ES en polygons
[[A]]@Polygons[[i]]@coords[,1]+6,ES en polygons
[[A]]@Polygons[[i]]@coords[,2]+5)
}
El tem...
2015 Apr 03
0
Mapas con spplot
...lt;iaguilar en gmail.com>:
> Hola
>
> He hecho el típico mapa con gadm y spplot:
>
>
> library(sp)
> ES <-
> local(get(load(url("http://biogeo.ucdavis.edu/data/gadm2/R/ESP_adm2.RData
> "))))
>
> acerco las canarias:
>
> A <- which(ES en data$NAME_1 == "Islas Canarias")
> L <- length(ES en polygons[[A]]@Polygons)
>
> L <- length(ES en polygons[[A]]@Polygons)
> for (i in 1:L){
> ES en polygons[[A]]@Polygons[[i]]@coords <- cbind(ES en polygons
> [[A]]@Polygons[[i]]@coords[,1]+6,ES en polygons
> [[A]]@Pol...
2018 Feb 23
0
Mapedit::selectMap in shiny map.
...shiny app. An error is returned:
Here is some toy code showing the code in using leaflet locally:
library(mapedit)
library(leaflet)
options(stringsAsFactors = F)
bounds <- c(5.956063, 10.49511, 45.81706, 47.80848 )
lf <- leaflet() %>%
addTiles()%>%
addPolygons(data =gadmCHE,
label = ~NAME_1,
layerId = ~NAME_1)
selected <-selectMap(lf)
##the above works fine and returns a dataframe giving the ids of the
selected polygons.
##however the code below - trying to implement in shiny fails with "Can?t
call runApp() from within runApp(). If your application code contains
runApp(), p...
2017 Jun 12
2
Keep only those values in a row in a data frame which occur only once.
Dear All,
I have a file data.txt as follows:
Name_1,A,B,C
Name_2,E,F
Name_3,I,J,I,K,L,M
I will read this with:
my_data<- read.csv("data.txt",header=FALSE,col.names=paste0("V",
seq(1:10)),fill=TRUE)
Then the file will have 10 columns. I am assuming that each row in data.txt
will have at the max 10 entries.
Note: Here each ro...
2018 Mar 19
1
Labelling a fortified GADM map plotted with ggplot and geom_map
...by researching the geom_map function here: http://ggplot2.tidyverse.org/reference/geom_map.html
my code looks like this:
# get the raw map data
can_map <- getData('GADM', country = "CAN", level = 1) # download map level with provinces
tract <- fortify(can_map, region = "NAME_1") # transforms data from shapefiles into a dataframe that ggplot can understand, from http://www.kevjohnson.org/making-maps-in-r/
# create subsets of the kcj data if needed, for example by year
kids_data_2017 <- subset(kids_data, year == 2017) # data for the year 2017
kids_data_2018 <-...
2010 Sep 26
1
plot single part of the country using gadm map
Dear all,
in GADM map there are three levels (nation, province and precinct) for each
country of the world but for all of them you are never able to plot only one
part of a chosen country.
To be sure, I am trying to plot only one region of “Italy” and colour the
different precincts in it. So far I am able to colour only the part of my
interest but the programme still plot the whole country.
Is