Skip to content

Commit 92d961b

Browse files
committed
fixes to get_ts
1 parent 7fd20b6 commit 92d961b

File tree

3 files changed

+179
-7
lines changed

3 files changed

+179
-7
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: openMSE
22
Title: Easily Install and Load the 'openMSE' Packages
3-
Version: 1.1.0
3+
Version: 1.1.1
44
Authors@R: c(
55
person("Adrian", "Hordyk",
66
role = c("aut", "cre"),

R/get_data_frames.R

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,13 @@ get_Years.Hist <- function(x) {
142142
out <- data.frame(Year=c(hist.yrs, proj.yrs), Period=c(rep('Historical', Hist@OM@nyears),
143143
rep('Projection', Hist@OM@proyears)))
144144
} else {
145-
hist.yrs <- x@Data@Year
146-
CurrentYr <- max(hist.yrs)
145+
CurrentYr <- Hist@OMPars$CurrentYr[1]
146+
nyears <- length(Hist@SampPars$Fleet$Find[1,])
147+
hist.yrs <- rev(seq(CurrentYr, by=-1, length.out=nyears))
148+
147149
if (is.na(CurrentYr))
148150
CurrentYr <- x@OMPars$CurrentYr[1]
149151

150-
151152
if (all(is.na(hist.yrs))) {
152153
nyears <- ncol(x@SampPars$Fleet$Find)
153154
hist.yrs <- rev(seq(CurrentYr, by=-1, length.out=nyears))
@@ -167,9 +168,10 @@ get_Years.Hist <- function(x) {
167168
get_Years.multiHist <- function(x) {
168169
multiHist <- x
169170

170-
hist.yrs <- multiHist[[1]][[1]]@Data@Year
171-
CurrentYr <- max(hist.yrs)
172-
nyears <- length(hist.yrs)
171+
CurrentYr <- multiHist[[1]][[1]]@OMPars$CurrentYr[1]
172+
nyears <- length(multiHist[[1]][[1]]@SampPars$Fleet$Find[1,])
173+
hist.yrs <- rev(seq(CurrentYr, by=-1, length.out=nyears))
174+
173175
proyears <- multiHist[[1]][[1]]@Misc$MOM@proyears
174176
proj.yrs <- (CurrentYr+1):(CurrentYr[1]+proyears)
175177
data.frame(Year=c(hist.yrs, proj.yrs), Period=c(rep('Historical', nyears),

config.toml

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
################################# Default configuration ###################
2+
# provide your domain here
3+
baseURL = "https://openMSE.com/"
4+
5+
# theme
6+
theme = "dot-hugo-documentation-theme"
7+
# site title
8+
title = "openMSE"
9+
# disable language
10+
disableLanguages = []
11+
# google analytics
12+
googleAnalytics = "G-5J6H3TBM2E" # paste your analytics ID here. (Ex: UA-123-45)
13+
14+
ignoreFiles = ["\\.Rmd$", "\\.Rmarkdown$", "_cache$", "\\.knit\\.md$", "\\.utf8\\.md$"]
15+
# unsafe html
16+
[markup.goldmark.renderer]
17+
unsafe = true
18+
19+
[intro]
20+
21+
22+
############################# Default Parameters ##########################
23+
[params]
24+
# logo is for all page
25+
logo = "images/OpenMSE2_color.png"
26+
logo_BM2 = "images/Blue Matter colour.png"
27+
28+
# logo white is for homepage logo, you can use colorful logo too...
29+
logo_white = "images/OpenMSE2_white.png"
30+
logo_BM = "images/Blue Matter white.png"
31+
32+
# when logo is empty, it will shown your site title
33+
34+
intro_text = ""
35+
36+
# customize color
37+
primary_color = "#02007e"
38+
body_color = "#f9f9f9"
39+
text_color = "#636363"
40+
text_color_dark = "#242738"
41+
white_color = "#ffffff"
42+
light_color = "#f8f9fa"
43+
44+
# font family
45+
font_family = "lato" # Choose font family from : https://fonts.google.com/
46+
47+
# contact form action
48+
contact_form_action = "#" # contact form works with : https://formspree.io
49+
50+
[params.contact]
51+
enable = true
52+
title = "Contact Us"
53+
message = ""
54+
name_placeholder = "Your name"
55+
email_placeholder = "Your email"
56+
email_disclaimer = "We will never share your email with anyone else."
57+
message_placeholder = "Please enter a message."
58+
button_text = "Submit"
59+
60+
############################## social links ##############################
61+
#[[params.social]]
62+
#icon = "ti-facebook" # themify icon pack : https://themify.me/themify-icons
63+
#link = "#"
64+
65+
#[[params.social]]
66+
#icon = "ti-twitter-alt" # themify icon pack : https://themify.me/themify-icons
67+
#link = "#"
68+
69+
[[params.social]]
70+
icon = "ti-github" # themify icon pack : https://themify.me/themify-icons
71+
link = "https://github.com/Blue-Matter/"
72+
73+
#[[params.social]]
74+
#icon = "ti-linkedin" # themify icon pack : https://themify.me/themify-icons
75+
#link = "#"
76+
77+
################################ English Language ######################
78+
[Languages.en]
79+
languageName = "En"
80+
languageCode = "en-us"
81+
weight = 1
82+
copyright = "Copyright © 2020 [Blue Matter Science](https://www.bluematterscience.com/)"
83+
84+
# banner
85+
[Languages.en.params.banner]
86+
title = "Welcome to openMSE"
87+
subtitle = "Open Source Software for Management Strategy Evaluation"
88+
bg_image = "images/remi-yuan-npnyKVgd-Kk-unsplash.jpg"
89+
placeholder = "Have a question? Just ask here or enter terms"
90+
91+
# call to action
92+
[Languages.en.params.cta]
93+
enable = true
94+
title = "Didn't find an answer to your question?"
95+
content = "Contact us for more information"
96+
# call to action button
97+
[Languages.en.params.cta.button]
98+
enable = true
99+
label = "contact us"
100+
link = "contact"
101+
102+
103+
################## english navigation #################
104+
[[Languages.en.menu.main]]
105+
name = "Home"
106+
url = "/"
107+
weight = 1
108+
109+
# Dropdown menu
110+
111+
[[Languages.en.menu.main]]
112+
weight = 2
113+
name = "Sections"
114+
hasChildren = true
115+
116+
[[Languages.en.menu.main]]
117+
parent = "Sections"
118+
name = "Welcome"
119+
url = "/#welcome"
120+
weight = 1
121+
hasChildren = true
122+
123+
[[Languages.en.menu.main]]
124+
parent = "Welcome"
125+
name = "About openMSE"
126+
url = "/#welcome"
127+
weight = 1
128+
129+
[[Languages.en.menu.main]]
130+
parent = "Sections"
131+
name = "OM Use Cases"
132+
url = "/#use-cases"
133+
weight = 2
134+
135+
[[Languages.en.menu.main]]
136+
parent = "Sections"
137+
name = "openMSE Objects"
138+
url = "/#objects"
139+
weight = 3
140+
141+
142+
[[Languages.en.menu.main]]
143+
parent = "Sections"
144+
name = "Using openMSE"
145+
url = "/#features"
146+
weight = 4
147+
148+
[[Languages.en.menu.main]]
149+
parent = "Sections"
150+
name = "Concepts and Tutorials"
151+
url = "/#tutorials"
152+
weight = 5
153+
154+
[[Languages.en.menu.main]]
155+
name = "OM Library"
156+
url = "/OM-library"
157+
weight = 3
158+
159+
[[Languages.en.menu.main]]
160+
name = "Faq"
161+
url = "faq"
162+
weight = 4
163+
164+
[[Languages.en.menu.main]]
165+
name = "contact"
166+
url = "contact"
167+
weight = 5
168+
169+
170+

0 commit comments

Comments
 (0)