Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
citizenair
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vmm
citizenair
Commits
6359503b
Commit
6359503b
authored
Nov 07, 2018
by
Jan Wijffels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add as_sp
parent
572a4830
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
0 deletions
+30
-0
citizenair/NAMESPACE
+1
-0
citizenair/R/appdata.R
+15
-0
citizenair/man/as_sp.Rd
+14
-0
No files found.
citizenair/NAMESPACE
View file @
6359503b
# Generated by roxygen2: do not edit by hand
S3method(as.data.frame,citizenair_userdata)
export(as_sp)
export(read_citizenair)
export(read_stations)
export(run_app)
...
...
citizenair/R/appdata.R
View file @
6359503b
...
...
@@ -33,5 +33,20 @@ setMethod(f = "initialize",
})
#' @title TODO
#' @description TODO
#' @param object the object
#' @export
as_sp
<-
function
(
object
){
if
(
inherits
(
object
,
"citizenair_stations"
)){
x
<-
as.data.frame
(
object
$
stations
)
x
<-
sp
::
SpatialPointsDataFrame
(
coords
=
x
[,
c
(
"lon"
,
"lat"
)],
data
=
x
,
proj4string
=
CRS
(
"+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0"
))
}
else
{
stop
(
"not implemented"
)
}
x
}
citizenair/man/as_sp.Rd
0 → 100644
View file @
6359503b
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/appdata.R
\name{as_sp}
\alias{as_sp}
\title{TODO}
\usage{
as_sp(object)
}
\arguments{
\item{object}{the object}
}
\description{
TODO
}
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