Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
6
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
I
irg
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alec L. Robitaille
irg
Commits
8e889127
Commit
8e889127
authored
Dec 27, 2018
by
Alec L. Robitaille
🚲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix integer types
parent
63bf71b4
Pipeline
#41492881
failed with stages
in 7 minutes and 5 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
R/filter.R
R/filter.R
+8
-2
vignettes/getting-started-with-irg.Rmd
vignettes/getting-started-with-irg.Rmd
+1
-1
No files found.
R/filter.R
View file @
8e889127
...
...
@@ -37,8 +37,14 @@ filter_qa <-
check_col
(
DT
,
'NDVI'
)
check_col
(
DT
,
qa
,
'qa'
)
if
(
typeof
(
DT
[[
'NDVI'
]])
!=
'integer'
)
{
warning
(
'casting NDVI column as integer'
)
DT
[,
'NDVI'
:=
as.integer
(
NDVI
)]
}
DT
[
get
(
qa
)
%in%
good
,
good
:=
TRUE
][
is.na
(
good
),
good
:=
FALSE
]
DT
[(
good
),
filtered
:=
as.integer
(
NDVI
)
]
DT
[(
good
),
filtered
:=
NDVI
]
DT
[
!
(
good
),
filtered
:=
NA
]
set
(
DT
,
j
=
'good'
,
value
=
NULL
)
}
...
...
@@ -94,7 +100,7 @@ filter_winter <-
overwrite_col
(
DT
,
'winter'
)
if
(
typeof
(
DT
[[
doy
]])
!=
'integer'
)
{
DT
[,
(
doy
)
:=
as.integer
(
.SD
),
.SDcols
=
doy
]
DT
[,
(
doy
)
:=
as.integer
(
.SD
[[
1
]]
),
.SDcols
=
doy
]
}
if
(
typeof
(
limits
)
!=
'integer'
)
{
...
...
vignettes/getting-started-with-irg.Rmd
View file @
8e889127
...
...
@@ -33,7 +33,7 @@ remotes::install_gitlab('robit.a/irg')
### Packages
`irg` depends on two packages (and `stats`):
* [`data.table`](https://github.com/Rdatatable/data.table) for all tabular processing
(hint: everything!)
* [`data.table`](https://github.com/Rdatatable/data.table) for all tabular processing
* [`RcppRoll`](https://github.com/kevinushey/RcppRoll) for fast rolling medians in `filter_roll`.
No external dependencies.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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