Skip to content

Commit 1be2912

Browse files
committed
clean for CRAN
1 parent 8a5a020 commit 1be2912

16 files changed

+66
-73
lines changed

NEWS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
## dev
22

33
# Releases
4-
## umx 4.40.00
5-
* August 2025 R 4.4.X
4+
## umx 4.4.0
5+
* August 2025 R 4.5.0
66
* NEW: `umx_wide4lmer` make data wide without having to understand the arcane reshape symbology
77
* IMPROVED: `umxPlotPredict` can do R^2 or r, italic format
88
* IMPROVED: `bucks` knows about `umx_set_dollar_symbol`.
Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,10 @@ fin_valuation <- function(revenue=6e6*30e3, opmargin=.08, expenses=.2, PE=30, sy
5757
#' @details
5858
#' Revenue stream is discounted back to a present day cash amount which is equivalent.
5959
#'
60-
#' @param cashflow Value of expected recurring payment
61-
#' @param discount Percent return to discount against (.05 = 5%)
62-
#' @param periods How many periods the stream delivers, e.g., (90-65) for 25 of a pension.
63-
#' @param PE of the company
64-
#' @param symbol Currency
65-
#' @param use reporting values in "B" (billion) or "M" (millions)
60+
#' @param income Value of expected recurring payment
61+
#' @param discount_rate Percent return to discount against (.05 = 5%)
62+
#' @param periods How many periods the stream delivers, e.g., 25 years of pension.
63+
#' @param symbol Currency symbol to use
6664
#' @return - value
6765
#' @export
6866
#' @family Miscellaneous Functions
@@ -71,9 +69,7 @@ fin_valuation <- function(revenue=6e6*30e3, opmargin=.08, expenses=.2, PE=30, sy
7169
#' @examples
7270
#' fin_net_present_value(27e3, .05, 25)
7371
#'
74-
fin_net_present_value <- function(income=27e3, discount_rate=.05, periods = 25, symbol = NULL) {
75-
if(is.null(symbol)){symbol = umx_set_dollar_symbol(silent=TRUE)}
76-
72+
fin_net_present_value <- function(income=27e3, discount_rate=.05, periods = 25, symbol = umx_set_dollar_symbol(silent=TRUE)) {
7773
cashflows = rep(income, periods)
7874
timePeriods = seq(1, periods)
7975
discount_factors = 1/(1+discount_rate)^timePeriods
@@ -102,29 +98,29 @@ fin_net_present_value <- function(income=27e3, discount_rate=.05, periods = 25,
10298
#' @md
10399
#' @examples
104100
#'
105-
#' fin_expected(current= 114,fair=140,ticker="NVDA", capital=.15, verb=T)
106-
#' NVDA return = 41 %
107-
#' delta (fair-current)= $ 26
108-
#' growth = $ 21
109-
#' expected gain = $ 47
110-
#' future value (final) = $ 161
101+
#' fin_expected(114,fair=140, ticker="NVDA", capital=.15, verb=TRUE)
102+
#' # NVDA return = 41 %
103+
#' # delta (fair-current)= $ 26
104+
#' # growth = $ 21
105+
#' # expected gain = $ 47
106+
#' # future value (final) = $ 161
111107
#'
112108
#' fin_expected(24, 130, ticker="SMMT")
113-
#' SMMT return = 523 %
109+
#' # SMMT return = 523 %
114110
#'
115-
#' fin_expected(24, 75, ticker="SMMT", verb=T)
116-
#' SMMT return = 259 %
117-
#' delta (fair-current)= $ 51
118-
#' growth = $ 11.25
119-
#' expected gain = $ 62.25
120-
#' future value (final) = $ 86.25
111+
#' fin_expected(24, 75, ticker="SMMT", verb=TRUE)
112+
#' # SMMT return = 259 %
113+
#' # delta (fair-current)= $ 51
114+
#' # growth = $ 11.25
115+
#' # expected gain = $ 62.25
116+
#' # future value (final) = $ 86.25
121117
#'
122-
#' fin_expected(750, 1000, ticker="LLY", verb=T)
123-
#' LLY return = 53 %
124-
#' delta (fair-current)= $ 250
125-
#' growth = $ 150
126-
#' expected gain = $ 400
127-
#' future value (final) = $ 1150
118+
#' fin_expected(750, 1000, ticker="LLY", verb=TRUE)
119+
#' # LLY return = 53 %
120+
#' # delta (fair-current)= $ 250
121+
#' # growth = $ 150
122+
#' # expected gain = $ 400
123+
#' # future value (final) = $ 1150
128124
#'
129125
fin_expected <- function(current=89, fair=140, ticker = "NVDA", capital=.15, verb = FALSE) {
130126
delta = (fair-current)

R/misc_and_utility.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5554,10 +5554,10 @@ umxCov2cor <- function(x) {
55545554
}
55555555

55565556

5557-
#' Take a long dataframe and make it wide for repeated measures and multi-lvel modelin in R
5557+
#' Take a long dataframe and make it wide for repeated measures and multi-level analysis
55585558
#'
55595559
#' @description
5560-
#' `umx_wide4lmer` from wide to long for repeated measures and multi-lvel modeling in R
5560+
#' `umx_wide4lmer` Transform data from wide to long format for repeated measures and multi-level modeling in R.
55615561
#'
55625562
#' Wraps reshape [stats::reshape()]
55635563
#'

inst/WORDLIST

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#AAAAAA
12
alsoDrop
23
correctAnswer
34
expt

man/bucks.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/fin_JustifiedPE.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/fin_NI.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/fin_expected.Rd

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/fin_interest.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/fin_net_present_value.Rd

Lines changed: 6 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)