Skip to content

Commit 652f7c2

Browse files
committed
Initial commit of the package
0 parents  commit 652f7c2

11 files changed

+400
-0
lines changed

Diff for: BayesReco.Rproj

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Version: 1.0
2+
3+
RestoreWorkspace: Default
4+
SaveWorkspace: Default
5+
AlwaysSaveHistory: Default
6+
7+
EnableCodeIndexing: Yes
8+
UseSpacesForTab: Yes
9+
NumSpacesForTab: 2
10+
Encoding: UTF-8
11+
12+
RnwWeave: Sweave
13+
LaTeX: pdfLaTeX
14+
15+
AutoAppendNewline: Yes
16+
StripTrailingWhitespace: Yes
17+
18+
BuildType: Package
19+
PackageUseDevtools: Yes
20+
PackageInstallArgs: --no-multiarch --with-keep.source

Diff for: DESCRIPTION

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Package: BayesReco
2+
Type: Package
3+
Title: Probabilistic Reconciliation Via Conditioning
4+
Version: 0.1.0
5+
Authors@R: c(person(given = "Nicolo",
6+
family = "Rubattu",
7+
role = c("aut"),
8+
email = "[email protected]"),
9+
person(given = "Dario",
10+
family = "Azzimonti",
11+
role = c("aut","cre"),
12+
email = "[email protected]",
13+
comment = c(ORCID = "0000-0001-5080-3061")),
14+
person(given = "Lorenzo",
15+
family = "Zambon",
16+
role = c("aut"),
17+
email = "[email protected]"),
18+
person(given = "Giorgio",
19+
family = "Corani",
20+
role = c("aut"),
21+
email = "[email protected]"))
22+
Maintainer: Dario Azzimonti <[email protected]>
23+
Description: Implementation of reconciliation methods of probabilistic forecast of time series.
24+
License: LGPL (>= 3)
25+
Encoding: UTF-8
26+
LazyData: true

Diff for: LICENSE.md

+163
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
GNU Lesser General Public License
2+
=================================
3+
4+
_Version 3, 29 June 2007_
5+
_Copyright © 2007 Free Software Foundation, Inc. &lt;<http://fsf.org/>&gt;_
6+
7+
Everyone is permitted to copy and distribute verbatim copies
8+
of this license document, but changing it is not allowed.
9+
10+
11+
This version of the GNU Lesser General Public License incorporates
12+
the terms and conditions of version 3 of the GNU General Public
13+
License, supplemented by the additional permissions listed below.
14+
15+
### 0. Additional Definitions
16+
17+
As used herein, “this License” refers to version 3 of the GNU Lesser
18+
General Public License, and the “GNU GPL” refers to version 3 of the GNU
19+
General Public License.
20+
21+
“The Library” refers to a covered work governed by this License,
22+
other than an Application or a Combined Work as defined below.
23+
24+
An “Application” is any work that makes use of an interface provided
25+
by the Library, but which is not otherwise based on the Library.
26+
Defining a subclass of a class defined by the Library is deemed a mode
27+
of using an interface provided by the Library.
28+
29+
A “Combined Work” is a work produced by combining or linking an
30+
Application with the Library. The particular version of the Library
31+
with which the Combined Work was made is also called the “Linked
32+
Version”.
33+
34+
The “Minimal Corresponding Source” for a Combined Work means the
35+
Corresponding Source for the Combined Work, excluding any source code
36+
for portions of the Combined Work that, considered in isolation, are
37+
based on the Application, and not on the Linked Version.
38+
39+
The “Corresponding Application Code” for a Combined Work means the
40+
object code and/or source code for the Application, including any data
41+
and utility programs needed for reproducing the Combined Work from the
42+
Application, but excluding the System Libraries of the Combined Work.
43+
44+
### 1. Exception to Section 3 of the GNU GPL
45+
46+
You may convey a covered work under sections 3 and 4 of this License
47+
without being bound by section 3 of the GNU GPL.
48+
49+
### 2. Conveying Modified Versions
50+
51+
If you modify a copy of the Library, and, in your modifications, a
52+
facility refers to a function or data to be supplied by an Application
53+
that uses the facility (other than as an argument passed when the
54+
facility is invoked), then you may convey a copy of the modified
55+
version:
56+
57+
* **a)** under this License, provided that you make a good faith effort to
58+
ensure that, in the event an Application does not supply the
59+
function or data, the facility still operates, and performs
60+
whatever part of its purpose remains meaningful, or
61+
62+
* **b)** under the GNU GPL, with none of the additional permissions of
63+
this License applicable to that copy.
64+
65+
### 3. Object Code Incorporating Material from Library Header Files
66+
67+
The object code form of an Application may incorporate material from
68+
a header file that is part of the Library. You may convey such object
69+
code under terms of your choice, provided that, if the incorporated
70+
material is not limited to numerical parameters, data structure
71+
layouts and accessors, or small macros, inline functions and templates
72+
(ten or fewer lines in length), you do both of the following:
73+
74+
* **a)** Give prominent notice with each copy of the object code that the
75+
Library is used in it and that the Library and its use are
76+
covered by this License.
77+
* **b)** Accompany the object code with a copy of the GNU GPL and this license
78+
document.
79+
80+
### 4. Combined Works
81+
82+
You may convey a Combined Work under terms of your choice that,
83+
taken together, effectively do not restrict modification of the
84+
portions of the Library contained in the Combined Work and reverse
85+
engineering for debugging such modifications, if you also do each of
86+
the following:
87+
88+
* **a)** Give prominent notice with each copy of the Combined Work that
89+
the Library is used in it and that the Library and its use are
90+
covered by this License.
91+
92+
* **b)** Accompany the Combined Work with a copy of the GNU GPL and this license
93+
document.
94+
95+
* **c)** For a Combined Work that displays copyright notices during
96+
execution, include the copyright notice for the Library among
97+
these notices, as well as a reference directing the user to the
98+
copies of the GNU GPL and this license document.
99+
100+
* **d)** Do one of the following:
101+
- **0)** Convey the Minimal Corresponding Source under the terms of this
102+
License, and the Corresponding Application Code in a form
103+
suitable for, and under terms that permit, the user to
104+
recombine or relink the Application with a modified version of
105+
the Linked Version to produce a modified Combined Work, in the
106+
manner specified by section 6 of the GNU GPL for conveying
107+
Corresponding Source.
108+
- **1)** Use a suitable shared library mechanism for linking with the
109+
Library. A suitable mechanism is one that **(a)** uses at run time
110+
a copy of the Library already present on the user's computer
111+
system, and **(b)** will operate properly with a modified version
112+
of the Library that is interface-compatible with the Linked
113+
Version.
114+
115+
* **e)** Provide Installation Information, but only if you would otherwise
116+
be required to provide such information under section 6 of the
117+
GNU GPL, and only to the extent that such information is
118+
necessary to install and execute a modified version of the
119+
Combined Work produced by recombining or relinking the
120+
Application with a modified version of the Linked Version. (If
121+
you use option **4d0**, the Installation Information must accompany
122+
the Minimal Corresponding Source and Corresponding Application
123+
Code. If you use option **4d1**, you must provide the Installation
124+
Information in the manner specified by section 6 of the GNU GPL
125+
for conveying Corresponding Source.)
126+
127+
### 5. Combined Libraries
128+
129+
You may place library facilities that are a work based on the
130+
Library side by side in a single library together with other library
131+
facilities that are not Applications and are not covered by this
132+
License, and convey such a combined library under terms of your
133+
choice, if you do both of the following:
134+
135+
* **a)** Accompany the combined library with a copy of the same work based
136+
on the Library, uncombined with any other library facilities,
137+
conveyed under the terms of this License.
138+
* **b)** Give prominent notice with the combined library that part of it
139+
is a work based on the Library, and explaining where to find the
140+
accompanying uncombined form of the same work.
141+
142+
### 6. Revised Versions of the GNU Lesser General Public License
143+
144+
The Free Software Foundation may publish revised and/or new versions
145+
of the GNU Lesser General Public License from time to time. Such new
146+
versions will be similar in spirit to the present version, but may
147+
differ in detail to address new problems or concerns.
148+
149+
Each version is given a distinguishing version number. If the
150+
Library as you received it specifies that a certain numbered version
151+
of the GNU Lesser General Public License “or any later version”
152+
applies to it, you have the option of following the terms and
153+
conditions either of that published version or of any later version
154+
published by the Free Software Foundation. If the Library as you
155+
received it does not specify a version number of the GNU Lesser
156+
General Public License, you may choose any version of the GNU Lesser
157+
General Public License ever published by the Free Software Foundation.
158+
159+
If the Library as you received it specifies that a proxy can decide
160+
whether future versions of the GNU Lesser General Public License shall
161+
apply, that proxy's public statement of acceptance of any version is
162+
permanent authorization for you to choose that version for the
163+
Library.

Diff for: NAMESPACE

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
exportPattern("^[[:alpha:]]+")

Diff for: R/hello.R

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Hello, world!
2+
#
3+
# This is an example function named 'hello'
4+
# which prints 'Hello, world!'.
5+
#
6+
# You can learn more about package authoring with RStudio at:
7+
#
8+
# http://r-pkgs.had.co.nz/
9+
#
10+
# Some useful keyboard shortcuts for package authoring:
11+
#
12+
# Install Package: 'Cmd + Shift + B'
13+
# Check Package: 'Cmd + Shift + E'
14+
# Test Package: 'Cmd + Shift + T'
15+
16+
hello <- function() {
17+
print("Hello, world!")
18+
}

Diff for: README.Rmd

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
output: github_document
3+
---
4+
5+
<!-- README.md is generated from README.Rmd. Please edit that file -->
6+
7+
```{r, include = FALSE}
8+
knitr::opts_chunk$set(
9+
collapse = TRUE,
10+
comment = "#>",
11+
fig.path = "man/figures/README-",
12+
out.width = "100%"
13+
)
14+
```
15+
16+
# BayesReco
17+
18+
<!-- badges: start -->
19+
<!-- badges: end -->
20+
21+
The goal of BayesReco is to ...
22+
23+
## Installation
24+
25+
You can install the development version of BayesReco like so:
26+
27+
``` r
28+
# FILL THIS IN! HOW CAN PEOPLE INSTALL YOUR DEV PACKAGE?
29+
# This will be install though our github/gitlab
30+
```
31+
32+
## Example
33+
34+
35+
36+
This is a basic example which shows you how to solve a common problem:
37+
38+
```{r example}
39+
library(BayesReco)
40+
## basic example code
41+
```
42+
43+
* Basic example of BUIS as in the python code, should run quick and ideally have nice plots.
44+
45+
## NOTES ON README.Rmd vs README.md (TO REMOVE FROM FINAL VERSIONS)
46+
47+
What is special about using `README.Rmd` instead of just `README.md`? You can include R chunks like so:
48+
49+
```{r cars}
50+
summary(cars)
51+
```
52+
53+
You'll still need to render `README.Rmd` regularly, to keep `README.md` up-to-date. `devtools::build_readme()` is handy for this. You could also use GitHub Actions to re-render `README.Rmd` every time you push. An example workflow can be found here: <https://github.com/r-lib/actions/tree/v1/examples>.
54+
55+
You can also embed plots, for example:
56+
57+
```{r pressure, echo = FALSE}
58+
plot(pressure)
59+
```
60+
61+
In that case, don't forget to commit and push the resulting figure files, so they display on GitHub and CRAN.

Diff for: README.md

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
2+
<!-- README.md is generated from README.Rmd. Please edit that file -->
3+
4+
# BayesReco
5+
6+
<!-- badges: start -->
7+
<!-- badges: end -->
8+
9+
The goal of BayesReco is to …
10+
11+
## Installation
12+
13+
You can install the development version of BayesReco like so:
14+
15+
``` r
16+
# FILL THIS IN! HOW CAN PEOPLE INSTALL YOUR DEV PACKAGE?
17+
# This will be install though our github/gitlab
18+
```
19+
20+
## Example
21+
22+
This is a basic example which shows you how to solve a common problem:
23+
24+
``` r
25+
library(BayesReco)
26+
## basic example code
27+
```
28+
29+
- Basic example of BUIS as in the python code, should run quick and
30+
ideally have nice plots.
31+
32+
## NOTES ON README.Rmd vs README.md (TO REMOVE FROM FINAL VERSIONS)
33+
34+
What is special about using `README.Rmd` instead of just `README.md`?
35+
You can include R chunks like so:
36+
37+
``` r
38+
summary(cars)
39+
#> speed dist
40+
#> Min. : 4.0 Min. : 2.00
41+
#> 1st Qu.:12.0 1st Qu.: 26.00
42+
#> Median :15.0 Median : 36.00
43+
#> Mean :15.4 Mean : 42.98
44+
#> 3rd Qu.:19.0 3rd Qu.: 56.00
45+
#> Max. :25.0 Max. :120.00
46+
```
47+
48+
You’ll still need to render `README.Rmd` regularly, to keep `README.md`
49+
up-to-date. `devtools::build_readme()` is handy for this. You could also
50+
use GitHub Actions to re-render `README.Rmd` every time you push. An
51+
example workflow can be found here:
52+
<https://github.com/r-lib/actions/tree/v1/examples>.
53+
54+
You can also embed plots, for example:
55+
56+
<img src="man/figures/README-pressure-1.png" width="100%" />
57+
58+
In that case, don’t forget to commit and push the resulting figure
59+
files, so they display on GitHub and CRAN.

Diff for: TODO.Rmd

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: "To Do file for package"
3+
output: github_document
4+
date: "2023-03-29"
5+
---
6+
7+
```{r setup, include=FALSE}
8+
knitr::opts_chunk$set(echo = TRUE)
9+
```
10+
11+
## Short term to do
12+
13+
* Decide Gitlab vs Github (it is possible to make a Gitlab repo public, just not by us)
14+
* Push to repo
15+
* Decide which emaile we prefer to use (Dario prefers gmail for R pacakges)
16+
17+
## Long term to do
18+
19+
* Decide who is maintainer
20+
* Decide licence (LGPL3 is reasonable for use also in Innosuisse projects)
21+
* In case it is needed expand package to use Rcpp (`usethis::use_rcpp_armadillo()`)

Diff for: TODO.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
To Do file for package
2+
================
3+
2023-03-29
4+
5+
## Short term to do
6+
7+
- Decide Gitlab vs Github (it is possible to make a Gitlab repo public,
8+
just not by us)
9+
- Push to repo
10+
- Decide which emaile we prefer to use (Dario prefers gmail for R
11+
pacakges)
12+
13+
## Long term to do
14+
15+
- Decide who is maintainer
16+
- Decide licence (LGPL3 is reasonable for use also in Innosuisse
17+
projects)
18+
- In case it is needed expand package to use Rcpp
19+
(`usethis::use_rcpp_armadillo()`)

Diff for: man/figures/README-pressure-1.png

22.4 KB
Loading

0 commit comments

Comments
 (0)