Skip to content

Commit

Permalink
v2.0.4
Browse files Browse the repository at this point in the history
Updated release.  Issue #68 , Issue #70
  • Loading branch information
leppott committed Dec 5, 2018
1 parent 23a1624 commit 6be639a
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 34 deletions.
64 changes: 32 additions & 32 deletions .Rhistory
Original file line number Diff line number Diff line change
@@ -1,35 +1,3 @@
# almost worked
#data.import[!(is.na(data.import[,myName.DateTime])),][myName.DateTime] <- strftime(data.import[!(is.na(data.import[,myName.DateTime])),][myName.DateTime]
# ,format="%Y-%m-%d")
# have to do where is NOT NA because will fail if the first item is NA
# assume all records have the same format.
#
# B.5.1.1. Update Date to "%Y-%m-%d" (equivalent to %F)
myField <- ContData.env$myName.Date
myFormat.In <- format.Date #"%Y-%m-%d"
myFormat.Out <- ContData.env$myFormat.Date #"%Y-%m-%d"
data.import[,myField][!is.na(data.import[,myField])] <- format(strptime(data.import[,myField][!is.na(data.import[,myField])],format=myFormat.In)
,format=myFormat.Out)
# B.5.1.2. Update Time to "%H:%M:%S" (equivalent to %T) (uses different function)
myField <- ContData.env$myName.Time
myFormat.In <- format.Time #"%H:%M:%S"
myFormat.Out <- ContData.env$myFormat.Time #"%H:%M:%S"
data.import[,myField][!is.na(data.import[,myField])] <- format(as.POSIXct(data.import[,myField][!is.na(data.import[,myField])],format=myFormat.In)
,format=myFormat.Out)
# B.5.1.3. Update DateTime to "%Y-%m-%d %H:%M:%S" (equivalent to %F %T)
myField <- ContData.env$myName.DateTime
myFormat.In <- format.DateTime #"%Y-%m-%d %H:%M:%S"
myFormat.Out <- ContData.env$myFormat.DateTime #"%Y-%m-%d %H:%M:%S"
data.import[,myField][!is.na(data.import[,myField])] <- format(strptime(data.import[,myField][!is.na(data.import[,myField])],format=myFormat.In)
,format=myFormat.Out)
# x<-data.import[,myField][!is.na(data.import[,myField])]
# (z<-x[2])
# (a <- strptime(z,format=myFormat.In))
# (b <- strptime(x,format=myFormat.In))
# # works on single record but fails on vector with strftime
# # strptime works but adds time zone (don't like but it works)
#
#
# B.5.2. Update DateTime, Date, and Time if NA based on other fields
# B.5.2.1. Update Date_Time if NA (use Date and Time)
myField <- ContData.env$myName.DateTime
Expand Down Expand Up @@ -510,3 +478,35 @@ setwd(paste0("./",myLibrary))
pkg <- "ContDataQC"
library(pkg, character.only = TRUE)
help(package=(pkg))
# NEWS
# Render then Copy NEWS so picked up in help
rmarkdown::render("NEWS.rmd", "all")
file.copy("NEWS.md", "NEWS", overwrite = TRUE)
file.remove("NEWS.html")
file.remove("NEWS.md")
#
# Library Name
myLibrary <- "ContDataQC"
# Load Library
library(devtools)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Create Package
# create(myLibrary)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Document, Install, and Reload Library
## Generate Documentation
setwd(paste0("./",myLibrary))
devtools::document()
## Install New Package (locally)
setwd("..") # return to root directory first
devtools::install(myLibrary)
## Reload library
library(myLibrary,character.only = TRUE)
# change wd back to package
setwd(paste0("./",myLibrary))
# Restart R within RStudio: Ctrl + Shift + F10
pkg <- "ContDataQC"
library(pkg, character.only = TRUE)
help(package=(pkg))
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ContDataQC
Title: Quality Control (QC) of Continous Monitoring Data
Version: 2.0.3.9001
Version: 2.0.4
Authors@R: c(
person("Erik W.", "Leppo", email="[email protected]",role=c("aut","cre")),
person("Ann","Roseberry Lincoln", role="ctb"),
Expand Down
8 changes: 7 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ NEWS-ContDataQC

<!-- NEWS.md is generated from NEWS.Rmd. Please edit that file -->

#> Last Update: 2018-12-05 09:46:04
#> Last Update: 2018-12-05 09:48:29

# Planned Updates

Expand Down Expand Up @@ -35,6 +35,12 @@ NEWS-ContDataQC

# Version History

## v2.0.4

2018-12-05

- New release version.

## v2.0.3.9001

2018-12-05
Expand Down
5 changes: 5 additions & 0 deletions NEWS.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ cat(paste0("Last Update: ",Sys.time()))

# Version History

## v2.0.4
2018-12-05

* New release version.

## v2.0.3.9001
2018-12-05

Expand Down

0 comments on commit 6be639a

Please sign in to comment.