Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Habitat Sampler
HabitatSampler
Commits
25f3bef5
Commit
25f3bef5
authored
Sep 15, 2021
by
Romulo Pereira Goncalves
Browse files
Uncomment code.
parent
e7a8c2f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
R-package/R/model_opt.r
View file @
25f3bef5
...
...
@@ -55,10 +55,10 @@ model_opt_r <- function(k,
if
(
sample_type
==
"regular"
)
{
pbt
<-
raster
::
sampleRegular
(
rast
,
size
=
sample_size
,
sp
=
T
)
}
#
f <- which(is.na(pbt@data[1]))
#
if (length(f) != 0) {
#
pbt <- pbt[-f,]
#
}
f
<-
which
(
is.na
(
pbt
@
data
[
1
]))
if
(
length
(
f
)
!=
0
)
{
pbt
<-
pbt
[
-
f
,]
}
set.seed
(
seed2
[
k
])
classes
<-
as.factor
(
sample
(
c
(
1
:
2
),
size
=
nrow
(
pbt
),
replace
=
T
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment