Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
rdiagnosis
basicr
Commits
ea2cd832
Commit
ea2cd832
authored
Sep 10, 2019
by
Jean-Marie Lepioufle
Browse files
replace plot_na_ts by plot_notna_ts
parent
c3702076
Changes
4
Hide whitespace changes
Inline
Side-by-side
NAMESPACE
View file @
ea2cd832
...
...
@@ -5,7 +5,7 @@ export(basic_info)
export(basic_ts)
export(plot_boxwhisk_ts)
export(plot_lmrd)
export(plot_na_ts)
export(plot_
not
na_ts)
export(plot_qq)
export(plot_qqRes)
export(plot_tbl_basic)
...
...
R/plot_na_ts.R
View file @
ea2cd832
#' plot_na_ts
#' plot_
not
na_ts
#' plot_na_ts
#' plot_
not
na_ts
#' @param x object of class tbl_friendlyts
#' @param fromDate fromDate
#' @param toDate toDate
...
...
@@ -16,9 +16,9 @@
#' @export
#' @examples
#' \dontrun{
#' plot_na_ts()
#' plot_
not
na_ts()
#' }
plot_na_ts
<-
function
(
x
,
fromDate
=
NULL
,
toDate
=
NULL
,
timeResolution
=
NULL
,
tzone
=
"UTC"
,
path
=
tempdir
(),
name
=
NULL
,
width_mm
=
200
,
height_mm
=
200
,
DESKTOP
=
TRUE
){
plot_
not
na_ts
<-
function
(
x
,
fromDate
=
NULL
,
toDate
=
NULL
,
timeResolution
=
NULL
,
tzone
=
"UTC"
,
path
=
tempdir
(),
name
=
NULL
,
width_mm
=
200
,
height_mm
=
200
,
DESKTOP
=
TRUE
){
# sub-period
...
...
@@ -29,9 +29,6 @@ plot_na_ts <- function(x,fromDate=NULL,toDate=NULL,timeResolution=NULL,tzone="UT
df
<-
friendlyts
::
dfts
(
tbl_fts
=
tmp
,
timeResolution
=
timeResolution
,
tzone
=
tzone
)
df
[[
"date"
]]
<-
as.POSIXct
(
df
[[
"date"
]])
# cat("df \n")
# print(df)
target
<-
setdiff
(
names
(
df
),
"date"
)
tmp
<-
lapply
(
target
,
function
(
y
)
{
...
...
@@ -44,9 +41,6 @@ plot_na_ts <- function(x,fromDate=NULL,toDate=NULL,timeResolution=NULL,tzone="UT
tmp
<-
do.call
(
"rbind"
,
tmp
)
tmp
<-
data.frame
(
date
=
tmp
[,
"date"
],
notna
=
tmp
[,
"notna"
]
*
as.integer
(
as.factor
(
tmp
[,
"target"
])),
target
=
as.factor
(
tmp
[,
"target"
]))
# cat("tmp \n")
# print(head(tmp))
#start plot
if
(
!
(
DESKTOP
))
{
...
...
@@ -66,8 +60,12 @@ plot_na_ts <- function(x,fromDate=NULL,toDate=NULL,timeResolution=NULL,tzone="UT
p
<-
ggplot2
::
ggplot
(
tmp
,
ggplot2
::
aes
(
x
=
date
,
y
=
notna
,
colour
=
target
))
+
ggplot2
::
geom_point
()
+
ggplot2
::
labs
(
x
=
"date"
,
y
=
""
)
#+
#ggplot2::theme(axis.line.y=ggplot2::element_blank(),axis.text.y=ggplot2::element_blank())
ggplot2
::
labs
(
x
=
"date"
,
y
=
"non-missing values"
)
+
ggplot2
::
theme
(
axis.line.y
=
ggplot2
::
element_blank
(),
axis.text.y
=
ggplot2
::
element_blank
(),
panel.grid.major
=
ggplot2
::
element_blank
(),
panel.grid.minor
=
ggplot2
::
element_blank
())
print
(
p
)
...
...
man/plot_na_ts.Rd
→
man/plot_
not
na_ts.Rd
View file @
ea2cd832
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_na_ts.R
\name{plot_na_ts}
\alias{plot_na_ts}
\title{plot_na_ts
plot_na_ts}
\name{plot_
not
na_ts}
\alias{plot_
not
na_ts}
\title{plot_
not
na_ts
plot_
not
na_ts}
\usage{
plot_na_ts(x, fromDate = NULL, toDate = NULL,
timeResolution = NULL,
tzone = "UTC", path = tempdir(),
name = NULL, width_mm = 200,
height_mm = 200, DESKTOP = TRUE)
plot_
not
na_ts(x, fromDate = NULL, toDate = NULL,
timeResolution = NULL,
tzone = "UTC", path = tempdir(),
name = NULL, width_mm = 200,
height_mm = 200, DESKTOP = TRUE)
}
\arguments{
\item{x}{object of class tbl_friendlyts}
...
...
@@ -31,12 +31,12 @@ plot_na_ts(x, fromDate = NULL, toDate = NULL, timeResolution = NULL,
\item{DESKTOP}{boolean}
}
\description{
plot_na_ts
plot_na_ts
plot_
not
na_ts
plot_
not
na_ts
}
\examples{
\dontrun{
plot_na_ts()
plot_
not
na_ts()
}
}
\keyword{friendlyts}
vignettes/basicr_on_data.luftkval.oslo10.Rmd
View file @
ea2cd832
...
...
@@ -69,7 +69,7 @@ tmp <- luft %>% select(names(luft)) %>%
```R
basicr::plot_na_ts(x=tmp,timeResolution=timeResolution,DESKTOP=TRUE)
basicr::plot_
not
na_ts(x=tmp,timeResolution=timeResolution,DESKTOP=TRUE)
```
...
...
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