Displaying 20 results from an estimated 10000 matches similar to: "Plot.raster hides the axis layer"
2011 Nov 24
1
readGDAL or raster for reading bit map files
Dear all,
I have asked yesterday of how I can read a simple bitmap file in R cran.
I was suggest to use either readGDAL or raster for loading my bitmap
a. I have done it with readGDAL like
store<-readGDAL(fname='lena256.bmp')
and it works,... but it converts my matrix-like notion of a bitmap to a large vector
b. Raster also returns a class that I can not understand.
So 1,
2010 Jul 28
2
Beginner stucked with raster + geoR package.
Hello everyone.
I am trying to build up understanding in R by trying to develop just some simple
scenarios.
I would like to explain you what I am trying to do and what I did so far.
I would like to put inside a RasterLayer (raster package) a Gaussian field (for
given covariance) using grf function (geoR package)
1. First I created a Raster Layer object
r <- raster() # Default values are
2013 Oct 22
2
Where is element 30?
Hi I have a vector like that
readCsvFile$V1
[1] 30 31 32 33 34 35 36 37 38 39 310 311 312 313 314 315 316 317 318
[20] 319 320 321 20 21 22 23 24 25 26 27 28 29 210 211 212 213 214 215
[39] 216 217 218 219 220 221 222 223 40 41 42 43 44 45 46 47 48 49 410
[58] 411 412 413 414 415 416 417 418 419 420 421
and I am looking to find where the number 31 is located. So I
2010 Oct 25
2
plot does not work
Hello everyone
The following two commands
plot.default(seq(1,5),seq(2,6))
plot(seq(1,5),seq(2,6))
plot nothing. One day ago this would create a simple plot diagram but
unfortunately right now no plot appears.
?plot returns
Help on topic 'plot' was found in the following packages:
Plot a Raster* object
(in package raster in library
2009 Feb 21
1
Extracting xy from raster based on raster value
I have a raster (which I called glc), which I read
into R as a raster with "raster.create.from.file" from the raster package (R-forge). Values in glc range between 1 and 27 (whole numbers only). I'd like to extract all cells with a value of 1 to create
a new raster with only the cells that have a value of 1, or to extract
the xy values of all raster cells with a value of 1. Could you
2011 Apr 21
1
Sorting values within a raster
I am working with a raster and want to take values assigned to each
cell and sort them from largest to smallest, then cummulatively sum
them together (in order from largest to smallest). I'll then be
coding the individual cells such that the top 10% of the largest cell
values can be visualize with one color, the next 10% with another and
so on.
I have tried a number of schemes but
2011 Jan 31
1
str() on raster objects fails for certain dimensions
Hi,
str() on raster objects fails for certain dimensions. For example:
> str(as.raster(0, nrow=1, ncol=100))
'raster' chr [1, 1:100] "#000000" "#000000" "#000000" "#000000" ...
> str(as.raster(0, nrow=1, ncol=101))
Error in `[.raster`(object, seq_len(max.len)) : subscript out of bounds
This seems to do with how str() and
2011 Dec 01
1
Raster manipulation in R
Hello everyone in the forum
For introducing myself I would say I have a basic knowledge of R.
Now I am intended to implement a flood algorithm using R. I have some MatLab
experience doing these, and as an example to explain more or less what I
want, I have a m code to calculate the slope from a Digital elevation model:
slope=zeros(row,col);
for i=2:row-1
for j=2:col-1
2013 Apr 24
2
How to make a raster image in R from my own data set
Hi R-user,
I was trying to make a raster map with WGS84 projection in R, but I could not make it. I found one data set in Google that data is almost the same format as of mine. I wanted to make a raster map of temperature with 1 degree spatial resolution for the global scale.
I could make it in GIS software but I do have many variables (to be many raster images) and ultimately I am importing them
2010 Jan 16
1
"Too many raster images" in devPS.c
Hi,
I am finding the recently added [1] functionality of embedding raster
images into plots on R devices very useful! Thanks to Paul Murrell and
others for providing that. I noted that in
https://svn.r-project.org/R/trunk/src/library/grDevices/src/devPS.c
a macro is defined: #define MAX_RASTERS 64, and consequently, I get
Error in grid.Call.graphics("L_raster", x$raster, x$x, x$y,
2011 Jun 10
2
merge large number of raster objects
Hello,
I have a large number of raster objects in memory, with names RH100,
RH101, RH102, etc. (myobjects <- ls(pattern='^RH')).
These rasters are sections of a continuous map, and I would like to
combine them using the RasterObject merge tool in package 'raster.'
Merge expects an input list of raster objects (outmap<-merge(x, y, ...),
where x, y, and ... are raster
2013 Jan 29
2
Netcdf and Raster Package Questions, Need .asc File for GIS
Hello R-Group,
I am new working with netcdf files and the raster package in R.I am
trying to read in a netcdf file using the package "ncdf".I am able to
get the lat, lon and parameter I need and can plot using
fill.contour.Ultimately, I am trying to create a .asc file to reafd into
GIS.I am using the package "raster" to read the parameter.When I read in
with
2020 Oct 31
2
raster::levels() not working in packaged function.
Apologies, I cannot see how to make a rero for this issue.
I have a function that uses levels(r) tor return the RAT of a raster "r"
when the function is sourced from a script
source(".\R\function.r")
it works fine.
when the function is built into a package and sourced from there
library(mypackage) using the same script file to make the package
levels(r)[[1]]
the same line
2009 Apr 18
1
install raster package on ubuntu
Dear all,
I am running R 2.8.1. under ubuntu, and I need to install
the package "raster" but I get the following error:
> install.packages("raster")
Warning in install.packages("raster") :
argument 'lib' is missing: using '/usr/local/lib/R/site-library'
--- Please select a CRAN mirror for use in this session ---
Loading Tcl/Tk interface ... done
2012 Oct 29
3
How can I map numbers to colours with raster?
This code will read binary file and display it as a map. may problem is that
this code is using a continuous colour scheme, even though I have discrete
data (which is a classification scheme). How can I map numbers to colours
with raster? Please
require(raster)
conne <- file("C:\\lai.bin", "rb")
sd<- readBin(conne, integer(), size=1, n=360*720, signed=F)
2012 Mar 21
2
To overlay my raster and its boundary
Hi
I want to overlay my raster and its boundary which is a shapefile.
When I used thise code separately, all is ok:
# Open raster
>Image<-read.table("C:\\Users\\Documents\\Nouveau\\Frequence.txt",sep="",dec=",",header=TRUE)
>testo<-rasterFromXYZ(Image)
>plot(testo)
>testo2 <- aggregate(testo,fact=10, fun=mean)
>plot(testo2)
# open
2012 Aug 08
1
Adjusting coordinates in raster plots
Dear R-Help,
When plotting a raster object the origin (0,0) is placed in the center.
E.g. using:
library(raster)
mat = matrix(runif(100),10,10)
r <- raster(ncol=10, nrow=10)
values(r) <- mat
plot(r, main='Raster example',xlab="x",ylab="y")
Does anyone know how to adjust the coordinate system?
E.g. I would like to have 0,0 at the top left.
My naive approach
2012 Nov 27
5
Predict function in Raster package
Hey,
I am having troubles using the 'predict' function with in the Raster
package. I am using pm<-predict(mm, predictors) where mm is the
mahalanobis distance and the predictors are a stack of 6 raster layers
containing environmental variables.
When I try to run the prediction I get the following warning message:
Warning message:
In layerNames(x): the layerNames function is
2012 Jan 25
4
x11() graphic device, displaying raster
Hello,
I am wondering about the X11() graphic device on Windows.
I try to plot a raster image but nothing gets displayed. I
found some pages where it is mentioned that x11() not
always supports raster rendering.
Is there any add on for x11, any update or any R-package
which solves that displaying problem in Windows?
What I try to test it is an example from the
package {raster}:
library(raster)
2012 Jan 25
4
x11() graphic device, displaying raster
Hello,
I am wondering about the X11() graphic device on Windows.
I try to plot a raster image but nothing gets displayed. I
found some pages where it is mentioned that x11() not
always supports raster rendering.
Is there any add on for x11, any update or any R-package
which solves that displaying problem in Windows?
What I try to test it is an example from the
package {raster}:
library(raster)