{"comment":{"url":"https://api.github.com/repos/myellen/MF850_Computational_Finance_Final/comments/20230490","html_url":"https://github.com/myellen/MF850_Computational_Finance_Final/commit/8c27e63119155ad8b36dc47c0097e91fb85de2a2#commitcomment-20230490","id":20230490,"user":{"login":"lintr-bot","id":10925265,"avatar_url":"https://avatars.githubusercontent.com/u/10925265?v=3","gravatar_id":"","url":"https://api.github.com/users/lintr-bot","html_url":"https://github.com/lintr-bot","followers_url":"https://api.github.com/users/lintr-bot/followers","following_url":"https://api.github.com/users/lintr-bot/following{/other_user}","gists_url":"https://api.github.com/users/lintr-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/lintr-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lintr-bot/subscriptions","organizations_url":"https://api.github.com/users/lintr-bot/orgs","repos_url":"https://api.github.com/users/lintr-bot/repos","events_url":"https://api.github.com/users/lintr-bot/events{/privacy}","received_events_url":"https://api.github.com/users/lintr-bot/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":null,"commit_id":"8c27e63119155ad8b36dc47c0097e91fb85de2a2","created_at":"2016-12-19T09:38:43Z","updated_at":"2016-12-19T09:38:43Z","body":"[MF850Utilities.R:1:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L1) *style:* **Variable and function names should be all lowercase.**\n```r\n​laggedDataFile <- \"laggeddata.rds\"\n^~~~~~~~~~~~~~\n```\n[MF850Utilities.R:5:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L5) *style:* **Variable and function names should be all lowercase.**\n```r\n​LinearRegrssionFile <- \"Linear_Ridge_Lasso.R\"\n^~~~~~~~~~~~~~~~~~~\n```\n[MF850Utilities.R:6:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L6) *style:* **Variable and function names should be all lowercase.**\n```r\n​RandomForestRegressionFile <- \"random_forest_reg.R\"\n^~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[MF850Utilities.R:7:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L7) *style:* **Variable and function names should be all lowercase.**\n```r\n​LogisticRegressionFile <- \"Logistic_Ridge_Lasso.R\"\n^~~~~~~~~~~~~~~~~~~~~~\n```\n[MF850Utilities.R:8:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L8) *style:* **Variable and function names should be all lowercase.**\n```r\n​RandomForestCatFile <- \"random_forest_cat.R\"  # Random forest high/low\n^~~~~~~~~~~~~~~~~~~\n```\n[MF850Utilities.R:9:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L9) *style:* **Variable and function names should be all lowercase.**\n```r\n​LogisticRegressionModelLambdaFile <- \"Logistic_Ridge_Lasso_model_lambda.rds\"\n^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[MF850Utilities.R:9:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L9) *style:* **Variable and function names should not be longer than 30 characters.**\n```r\n​LogisticRegressionModelLambdaFile <- \"Logistic_Ridge_Lasso_model_lambda.rds\"\n^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[MF850Utilities.R:12:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L12) *style:* **Variable and function names should be all lowercase.**\n```r\n​LinearRegrssionModelFile <- \"Linear_Ridge_Lasso_model.rds\"\n^~~~~~~~~~~~~~~~~~~~~~~~\n```\n[MF850Utilities.R:13:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L13) *style:* **Variable and function names should be all lowercase.**\n```r\n​LinearRegrssionModelLambdaFile <- \"Linear_Ridge_Lasso_model_lambda.rds\"\n^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[MF850Utilities.R:14:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L14) *style:* **Variable and function names should be all lowercase.**\n```r\n​RandomForestRegressionModelFile <- \"random_forest_model.rds\"\n^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[MF850Utilities.R:14:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L14) *style:* **Variable and function names should not be longer than 30 characters.**\n```r\n​RandomForestRegressionModelFile <- \"random_forest_model.rds\"\n^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[MF850Utilities.R:15:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L15) *style:* **Variable and function names should be all lowercase.**\n```r\n​LogisticRegressionModelFile <- \"Logistic_Ridge_Lasso_model.rds\"\n^~~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[MF850Utilities.R:16:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L16) *style:* **Variable and function names should be all lowercase.**\n```r\n​RandomForestCatModelFile <- \"random_forest_cat_model.rds\"\n^~~~~~~~~~~~~~~~~~~~~~~~\n```\n[MF850Utilities.R:18:8:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L18) *style:* **Put spaces around all infix operators.**\n```r\n​par(ask=FALSE)\n      ~^~\n```\n[MF850Utilities.R:25:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L25) *style:* **Variable and function names should be all lowercase.**\n```r\n​loadLaggedDataSet <- function() {\n^~~~~~~~~~~~~~~~~\n```\n[MF850Utilities.R:26:36:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L26) *style:* **Variable and function names should be all lowercase.**\n```r\n​  mynewdataframe <- readRDS(file = laggedDataFile)\n                                   ^~~~~~~~~~~~~~\n```\n[MF850Utilities.R:26:36:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L26) *warning:* **no visible binding for global variable ‘laggedDataFile’**\n```r\n​  mynewdataframe <- readRDS(file = laggedDataFile)\n                                   ^~~~~~~~~~~~~~\n```\n[MF850Utilities.R:31:57:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L31) *style:* **Commas should always have a space after.**\n```r\n​  packagestoinstall_split <- strsplit(packagestoinstall,\", \")[[1]]\n                                                        ^\n```\n[MF850Utilities.R:33:7:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L33) *style:* **Place a space before left parenthesis, except in a function call.**\n```r\n​    if(!packagename %in% rownames(installed.packages())){\n      ^\n```\n[MF850Utilities.R:37:31:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L37) *style:* **Commas should always have a space after.**\n```r\n​      print(paste(packagename,\"already installed\"))\n                              ^\n```\n[MF850Utilities.R:39:40:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L39) *style:* **Put spaces around all infix operators.**\n```r\n​    library(packagename, character.only=TRUE)\n                                      ~^~\n```\n[MF850Utilities.R:43:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L43) *style:* **Variable and function names should be all lowercase.**\n```r\n​lagStockData <- function(stockdata) {\n^~~~~~~~~~~~\n```\n[MF850Utilities.R:47:6:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L47) *style:* **Place a space before left parenthesis, except in a function call.**\n```r\n​  for(company in companies)\n     ^\n```\n[MF850Utilities.R:48:3:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L48) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**\n```r\n​  {\n  ^\n```\n[MF850Utilities.R:50:51:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L50) *style:* **Commas should always have a space after.**\n```r\n​    futurereturns <- c(returns[2:length(returns)],NA)\n                                                  ^\n```\n[MF850Utilities.R:51:29:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L51) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**\n```r\n​    if (1 == NROW(returns)) {futurereturns <- c(NA)}\n                            ^\n```\n[MF850Utilities.R:51:52:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L51) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**\n```r\n​    if (1 == NROW(returns)) {futurereturns <- c(NA)}\n                                                   ^\n```\n[MF850Utilities.R:52:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L52) *style:* **Trailing whitespace is superfluous.**\n```r\n​    \n^~~~\n```\n[MF850Utilities.R:54:16:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L54) *style:* **Use <-, not =, for assignment.**\n```r\n​    newdataset = rbind(newdataset, company)\n               ^\n```\n[MF850Utilities.R:56:7:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L56) *style:* **Place a space before left parenthesis, except in a function call.**\n```r\n​    if(i %% 500 == 0) print(i)\n      ^\n```\n[MF850Utilities.R:58:30:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L58) *style:* **Variable and function names should be all lowercase.**\n```r\n​  saveRDS(newdataset, file = laggedDataFile)\n                             ^~~~~~~~~~~~~~\n```\n[MF850Utilities.R:58:30:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L58) *warning:* **no visible binding for global variable ‘laggedDataFile’**\n```r\n​  saveRDS(newdataset, file = laggedDataFile)\n                             ^~~~~~~~~~~~~~\n```\n[MF850Utilities.R:62:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L62) *style:* **Variable and function names should be all lowercase.**\n```r\n​removeLastMonth <- function(stockdata) {\n^~~~~~~~~~~~~~~\n```\n[MF850Utilities.R:66:6:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L66) *style:* **Place a space before left parenthesis, except in a function call.**\n```r\n​  for(company in companies)\n     ^\n```\n[MF850Utilities.R:67:3:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L67) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**\n```r\n​  {\n  ^\n```\n[MF850Utilities.R:68:13:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L68) *style:* **Use <-, not =, for assignment.**\n```r\n​    company = company[-1,]\n            ^\n```\n[MF850Utilities.R:68:26:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L68) *style:* **Commas should always have a space after.**\n```r\n​    company = company[-1,]\n                         ^\n```\n[MF850Utilities.R:69:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L69) *style:* **Trailing whitespace is superfluous.**\n```r\n​    \n^~~~\n```\n[MF850Utilities.R:70:16:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L70) *style:* **Use <-, not =, for assignment.**\n```r\n​    newdataset = rbind(newdataset, company)\n               ^\n```\n[MF850Utilities.R:72:7:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L72) *style:* **Place a space before left parenthesis, except in a function call.**\n```r\n​    if(i %% 500 == 0) print(i)\n      ^\n```\n[MF850Utilities.R:76:1:](https://github.com/myellen/MF850_Computational_Finance_Final/blob/8c27e63119155ad8b36dc47c0097e91fb85de2a2/MF850Utilities.R#L76) *style:* **Trailing blank lines are superfluous.**\n```r\n​\n^\n```"}}
{"actor":{"display_login":"lintr-bot"}}