Displaying 20 results from an estimated 1100 matches similar to: "predict pixels of raster using caret-derived models"
2004 Feb 13
2
Readbin and file position
I have a binary file which is an image with multiple bands, arranged in BSQ
format such that R, B and G are all N x M sized matrices (corresponding to
Red, Blue and Green colors respectively). The BSQ file arranges the data as
[R, B, G], so to access the B matrix, I have to read forward N x M + 1
number of samples. Is there a fast way to define a variable as the B matrix
exclusively (e.g. Can I
2013 May 15
1
stack object layer names not visible
I use to be able to see the layer names of a RasterStack by just typing
its name but now I only get this
class : RasterStack
dimensions : 70, 180, 12600 (nrow, ncol, ncell)
resolution : 0.5, 0.5 (x, y)
extent : -80, 10, 50, 85 (xmin, xmax, ymin, ymax)
coord. ref. : NA
If I do plot(s) then I can see all the layers and their names.
Why is this happening?
2009 May 09
0
clump of binary pixels on raster
Dear all,
I have a set od 30,000 binary landscapes, which represent habitat and
non-habitat cover.
I need to generate images that identify those neighbour (rule 8) pixels as
one patch ID,
and a different patch ID for each clump of pixels. I coded it using
labcon(adehabitat),
but as some of my landscapes have so many patches, labcon not finish and
entry in
a eternal looping. By other side, I coded
2012 Jul 10
5
-1.1 - 0.1 + 1.2 is NOT null! Why?
Hello,
I fear its a stupid question,..but here it is:
If I do this simple calculation with the R console, I surprisingly do not
get a zero. Why?
-1.1-0.1+1.2
[1] -2.220446e-16
greetings, Ole
--
View this message in context: http://r.789695.n4.nabble.com/1-1-0-1-1-2-is-NOT-null-Why-tp4636053.html
Sent from the R help mailing list archive at Nabble.com.
[[alternative HTML version
2013 Mar 19
1
How to get the rolling standard deviation in rasters?
I am using this code to calculate the moving average mean.It worked fine but
when I wanted to also calculate based on sd(stander deviation) I got the
error shown below.
I read this documentation of R movingFun and found that sd was mentioned at
http://hosho.ees.hokudai.ac.jp/~kubo/Rdoc/library/raster/html/movingFun.html
I wonder if needs any other things to conseder or sd is not at all supplied
2013 Mar 18
4
Why stacking rasters return NAs?
I have several rasters that I want to do some calculations ,basically
calculating the moving average.
dir2 <- list.files("D:\\2010+2011", "*.bin", full.names = TRUE)
saf=stack(dir2)
movi <- overlay(stack(saf),fun=function(x) movingFun(x, fun=mean,
n=3, na.rm=TRUE))
Error in .overlayList(x, fun = fun, filename = filename,
2017 Aug 02
1
Looping Through QuantMod Objects
Dear R Helpers,
I have run into a problem trying to perform a number of actions on a set
of quantmod data objects through a loop and I am hoping that this is an
easy problem for someone else as opposed to very difficult for me.
The example task is to get the first three objects of the quarterly
balance sheet for a number of companies from the getFinancials object and
put them together into a
2018 Mar 08
0
add single points to a level plot
Hi all,
I ran the code:
> s <- stack(replicate(2, raster(matrix(runif(100), 10))))
> xy <- data.frame(coordinates(sampleRandom(s, 10, sp=TRUE)),
+ z1=runif(10), z2=runif(10))
> levelplot(s, margin=FALSE, at=seq(0, 1, 0.05)) +
+ layer(sp.points(xy, pch=ifelse(pts$z1 < 0.5, 2, 3), cex=2, col=1),
columns=1) +
+ layer(sp.points(xy, pch=ifelse(pts$z2 < 0.5, 2,
2018 Mar 08
1
add single points to a level plot
You need to load the package 'rasterVis'
> library(rasterVis)
HTH,
Eric
On Thu, Mar 8, 2018 at 5:11 PM, lily li <chocold12 at gmail.com> wrote:
> Hi all,
>
> I ran the code:
> > s <- stack(replicate(2, raster(matrix(runif(100), 10))))
> > xy <- data.frame(coordinates(sampleRandom(s, 10, sp=TRUE)),
> + z1=runif(10), z2=runif(10))
2007 Apr 30
0
[999] branches/wxruby2/wxwidgets_282/samples/caret/caret.rb: Use paint() instead of ClientDC.new() in caret sample
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding:
2010 Oct 06
1
R getting slower until it breaks...
Hello R-users,
I'm currently facing a pretty hard problem which I'm hopping you'll be able to help me with. I'm using R to create images. That alone is not the problem, the problem is that I'm using R to create 168 000 images... My code (which is given below) use different package (raster and rgdal) to import a image (size 20gig) and divide it into 168 000 pictures that are
2011 Aug 28
1
Trying to extract probabilities in CARET (caret) package with a glmStepAIC model
Dear developers,
I have jutst started working with caret and all the nice features it offers. But I just encountered a problem:
I am working with a dataset that include 4 predictor variables in Descr and a two-category outcome in Categ (codified as a factor).
Everything was working fine I got the results, confussion matrix etc.
BUT for obtaining the AUC and predicted probabilities I had to add
2007 Jul 16
0
[1113] trunk/wxruby2/samples/caret/caret.rb: Ensure the canvas has focus so KeyEvents are directed to it, fixing bug 10663
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding:
2007 Apr 29
0
[981] branches/wxruby2/wxwidgets_282/samples/caret/caret.rb: Don''t call PaintDC.new; just refresh() instead of duplicating paint code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding:
2007 Jul 21
0
[1130] trunk/wxruby2/swig/classes/Caret.i: Make Caret managed as object, so it is cleaned up properly when not
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding:
2024 Sep 24
2
Problem with converting grib file to excel
Dear R users;
I have downloaded a grib file format (Met.grib) and I want to export its
data to excel file. Also I want to do some mathematic on some columns. But
I got error. I would be more than happy if anyone can help me to do this. I
have provided the codes and the Met.grib file in this email.
Sincerely yours
# Load the necessary libraries
> library(raster) # For reading GRIB files
2012 Jun 06
0
randomForest Species Distribution Modelling
Hi,
I appologise if this is a rudimentary question and long winded but I just
wanted to let ye know where I'm comming from. I'm new to R and I'm trying to
use the 'randomForest' package to classify and predict. The Error message
that is troubling me is:
> pr<-predict(predictors,rf1, ext=ext)
Error in x[...] <- m : NAs are not allowed in subscripted assignments
In
2013 Feb 13
2
CARET: Any way to access other tuning parameters?
The documentation for caret::train shows a list of parameters that one can
tune for each method classification/regression method. For example, for
the method randomForest one can tune mtry in the call to train. But the
function call to train random forests in the original package has many
other parameters, e.g. sampsize, maxnodes, etc.
Is there **any** way to access these parameters using train
2012 Dec 12
2
Problem installing package "caret"
Folks:
I keep getting the following error message (I'm on Windows 7, R-2.15.2, and
tried a reboot...). Thx!
John
> install.packages("caret")Installing package(s) into ‘C:/Program Files/R/R-2.15.2/library’
(as ‘lib’ is unspecified)trying URL
'http://streaming.stat.iastate.edu/CRAN/bin/windows/contrib/2.15/caret_5.15-045.zip'Content
type 'application/zip' length
2009 Jan 25
0
caret version 4.06 released
Version 4.06 of the caret package was sent to CRAN.
caret can be used to tune the parameters of predictive models using
resampling, estimate variable importance and visualize the results.
There are also various modeling and "helper" functions that can be
useful for training models. caret has wrappers to over 50 different
models for classification and regression. See the package