Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hongyuanjia/eplusbuildr
A collection of useful functions to work with eplusr
https://github.com/hongyuanjia/eplusbuildr
Last synced: about 1 month ago
JSON representation
A collection of useful functions to work with eplusr
- Host: GitHub
- URL: https://github.com/hongyuanjia/eplusbuildr
- Owner: hongyuanjia
- License: other
- Created: 2019-11-11T14:34:52.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-10T15:59:51.000Z (almost 5 years ago)
- Last Synced: 2024-10-13T19:09:00.945Z (2 months ago)
- Language: R
- Homepage: https://hongyuanjia.github.io/eplusbuildr
- Size: 49.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output:
github_document
---```{r setup, echo = FALSE}
library(knitr)# the default output hook
hook_output = knitr::knit_hooks$get('output')
knitr::knit_hooks$set(output = function(x, options) {
if (!is.null(n <- options$out.lines)) {
x <- unlist(strsplit(x, '\n', fixed = TRUE))
if (length(x) > n) {
# truncate the output
x <- c(head(x, n), '....', '')
} else {
x <- c(x, "")
}
x <- paste(x, collapse = '\n') # paste first n lines together
}
hook_output(x, options)
})knitr::opts_knit$set(root.dir = tempdir())
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)# Make sure the date is shown in English format not Chinese.
invisible(Sys.setlocale(category = "LC_TIME", locale = "en_US.UTF-8"))
```# eplusbuildr
[![Travis-CI Build Status](https://travis-ci.com/hongyuanjia/eplusbuildr.svg?branch=master)](https://travis-ci.com/hongyuanjia/eplusbuildr)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/hongyuanjia/eplusbuildr?branch=master&svg=true)](https://ci.appveyor.com/project/hongyuanjia/eplusbuildr)
[![codecov](https://codecov.io/gh/hongyuanjia/eplusbuildr/branch/master/graph/badge.svg)](https://codecov.io/gh/hongyuanjia/eplusbuildr)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/eplusbuildr)](https://cran.r-project.org/package=eplusbuildr)
[![CRAN Checks](https://cranchecks.info/badges/summary/eplusbuildr)](https://cranchecks.info/pkgs/eplusbuildr)
[![CRAN Download Badge](https://cranlogs.r-pkg.org/badges/eplusbuildr)](https://cran.r-project.org/package=eplusbuildr)> A collection of useful functions to work with eplusr.
## Installation
Currently eplusbuidr is not on CRAN yet. You can install the development version
from GitHub.```{r gh-installation, eval = FALSE}
# install.packages("remotes")
remotes::install_github("hongyuanjia/eplusbuildr")
```## Get started
```{r}
library(eplusr)
library(eplusbuildr)# read model
idf <- read_idf(file.path(eplus_config(8.8)$dir, "ExampleFiles", "RefBldgLargeHotelNew2004_Chicago.idf"))# Remove not-used objects
purge_object(idf, "Material")# Merge same objects into one
merge_object(idf, "Schedule:Compact")# Rename objects using function
# purrr-like function definition supported
idf$object_name("ZoneHVAC:FourPipeFanCoil")rename_per_fun(idf, "ZoneHVAC:FourPipeFanCoil",
~gsub("fan coil", "four-pipe fan coil", .x)
)idf$object_name("ZoneHVAC:FourPipeFanCoil")
# Rename objects based on class and fielf values
idf$object_name("People")rename_per_field(idf, "People", "Zone or ZoneList Name")
idf$object_name("People")
```## Author
Hongyuan Jia
## License
The project is released under the terms of MIT License.
Copyright © 2019 Hongyuan Jia