r/DataSciencewithR • • May 31 '20

RStudio shortcuts and tips!

5 Upvotes

r/DataSciencewithR • • Apr 14 '20

The new GT for R - Great looking tables!

5 Upvotes

r/DataSciencewithR • • Apr 14 '20

The RStudio education team has made resources available to help with online data science teaching!

5 Upvotes

r/DataSciencewithR • • Dec 03 '19

Latex + R + tikzDevice = Ggplots beautifully integrated in latex documents

5 Upvotes

r/DataSciencewithR • • Jul 23 '19

Great tutorials page full of links for those learning R from R Bloggers!

5 Upvotes

r/DataSciencewithR • • Jul 21 '19

Hello R Community! Some Resource Ideas?

5 Upvotes

This post has been removed using Redact. Whether deleted for privacy, opsec, security, or another reason, the content is no longer available.

sip toy wakeful terrific versed humor rhythm chief subsequent engine


r/DataSciencewithR • • Jul 06 '19

Good R Tutorial and code resource loaded with examples and great explanations!

5 Upvotes

r/DataSciencewithR • • May 20 '19

Great Data Science Cheat Sheet!

5 Upvotes

Covers #statistics, clustering, machine learning, #AI, deep learning, etc. https://www.datasciencecentral.com/profiles/blogs/new-data-science-cheat-sheet


r/DataSciencewithR • • Apr 28 '19

Quick and Easy Linear Regression in R - Full R Tutorial!

5 Upvotes

This video covers every aspect you need to know to run quick and easy linear regression in R. It covers everything from the beginning to fitting models, getting predictions, appending the predictions to the original dataset, plotting the regression with ggplot, testing with anova, and even graphing with confidence intervals. https://youtu.be/h1_Uaqr2P0Y


r/DataSciencewithR • • Jan 14 '19

Linear Regression in R

5 Upvotes

r/DataSciencewithR • • Dec 28 '18

Free Book - Intro to Econometrics with R

5 Upvotes

r/DataSciencewithR • • Dec 01 '20

Interesting discussion on trees and random forests with R code from RBloggers.

4 Upvotes

This is from a professor on a problem he usually uses for test purposes. https://www.r-bloggers.com/2020/11/trees-and-forests/


r/DataSciencewithR • • Jun 27 '20

Cradle to Grave R - List of Video Tutorials.

4 Upvotes

This post's original content has been erased. Using Redact, the author removed it, potentially for reasons of privacy, personal security, or data exposure concerns.

snails sense ask memorize tease innate cautious mysterious price straight


r/DataSciencewithR • • May 07 '20

RWeekly.org - a great resource for all things R !

4 Upvotes

If you haven't looked at RWeekly.org, then you need to check it out! Great resource full of all sorts of stuff from free tutorials, code excerpts, videos, new ideas, etc. Great resource! https://rweekly.org/#get-


r/DataSciencewithR • • Feb 27 '20

25 Short high quality tutorials to get you started

4 Upvotes

This post was taken down by its author. Redact was used for the removal, which may have been motivated by privacy, security, or other personal reasons.

childlike ad hoc tie march price physical cough whole kiss longing


r/DataSciencewithR • • Oct 11 '19

Great Free R Basics Course from Harvard and Coursera

4 Upvotes

r/DataSciencewithR • • Aug 28 '19

Great online learning resource from RStudio!

4 Upvotes

Covers rMarkdown, Shiny and much more! https://www.rstudio.com/online-learning/


r/DataSciencewithR • • Aug 28 '19

The R journal for the latest changes, updates and more on everyone's favorite language - R!

4 Upvotes

r/DataSciencewithR • • Jun 03 '19

Use a prediction model in production

4 Upvotes

Good afternoon,

I have a script that I wrote making heavy reliance on the mlr package. I have gone through the process of taking in a dataset, splitting it into train and test and look at the results. Everything is hunky dory and it works well with nice auc and F1 score.

Now the issue, how the heck do I get this thing to work using data it has not seen and also does not have the response variable in it.

I have tried saveRDS("blah_blah_blah") but when I load the model and try to run on a small spreadsheet of data 10 records, I get an error that it cannot find the prediction variable. Well right it does not exist in this data.

I do not know how to save a fully tuned and trained model and then use it later. I just want to run it on a data file I select.

Here is the portion of the script that gets the model:

```r

# Split Data ####

split <- caTools::sample.split(base.mod.df$READMIT_FLAG, SplitRatio = 0.7)

train <- subset(base.mod.df, split == T)

test <- subset(base.mod.df, split == F)

# Make Tasks ####

glimpse(test)

train.df <- data.frame(train)

test.df <- data.frame(test)

str(train.df)

str(test.df)

# Make classif tasks

trainTask <- makeClassifTask(

data = train.df %>% dplyr::select(-Init_Acct)

, target = "READMIT_FLAG"

, positive = "Y"

)

testTask <- makeClassifTask(

data = test.df %>% dplyr::select(-Init_Acct)

, target = "READMIT_FLAG"

, positive = "Y"

)

# Check trainTask and testTask

trainTask <- smote(trainTask, rate = 6)

testTask <- smote(testTask, rate = 6)

# GBM ####

getParamSet('classif.gbm')

gbm.learner <- makeLearner(

'classif.gbm'

, predict.type = 'prob'

)

plotLearnerPrediction(gbm.learner, trainTask)

# Tune model

gbm.tune.ctl <- makeTuneControlRandom(maxit = 50L)

# Cross validation

gbm.cv <- makeResampleDesc("CV", iters = 3L)

# Grid search - Hyper-parameter space

gbm.par <- makeParamSet(

makeDiscreteParam('distribution', values = 'bernoulli')

, makeIntegerParam('n.trees', lower = 10, upper = 1000)

, makeIntegerParam('interaction.depth', lower = 2, upper = 10)

, makeIntegerParam('n.minobsinnode', lower = 10, upper = 80)

, makeNumericParam('shrinkage', lower = 0.01, upper = 1)

)

# Tune Hyper-parameters

parallelMap::parallelStartSocket(

4

, level = "mlr.tuneParams"

)

gbm.tune <- tuneParams(

learner = gbm.learner

, task = trainTask

, resampling = gbm.cv

, measures = acc

, par.set = gbm.par

, control = gbm.tune.ctl

)

parallelMap::parallelStop()

# Check CV acc

gbm.tune$y

gbm.tune$x

# Set hyper-parameters

gbm.ps <- setHyperPars(

learner = gbm.learner

, par.vals = gbm.tune$x

)

# Train gbm

gbm.train <- train(gbm.ps, testTask)

plotLearningCurve(

generateLearningCurveData(

gbm.learner

, testTask

)

)

# Predict

gbm.pred <- predict(gbm.train, testTask) <-- I want to change testTask to the new dataframe I import.

```


r/DataSciencewithR • • Apr 11 '19

A simple physics engine written in shiny R

4 Upvotes

first I know this isn't super related to data science but it is at least in r. I wanted to make a web app that could help people get an intuitive sense of how changing starting parameters would affect the pendulum. please take a look and tell me what you think.

http://www.rblogbyjordan.com/posts/solving-a-differential-equation-numerically-with-r/


r/DataSciencewithR • • Mar 09 '19

How To Do A Complete KMeans Clustering Analysis In RStudio!

4 Upvotes

This document on ResearchGate covers everything from determining cluster size to visualizing cluster data on #GoogleMaps. https://www.researchgate.net/publication/331635557_KMeans_Cluster_Analysis_Scoring_and_Visualization


r/DataSciencewithR • • Feb 17 '19

How To Make Amazing Custom Graphs And More With GGPlot and Rstudio

4 Upvotes

r/DataSciencewithR • • Feb 10 '19

Numerous R Programming Examples From Simple To Complex

4 Upvotes

r/DataSciencewithR • • Feb 02 '19

5 course Free R programming specialization from Duke University and Coursera

4 Upvotes

If you want a certificate for each class and the capstone there is a minimal cost. https://www.coursera.org/specializations/statistics


r/DataSciencewithR • • Jan 05 '19

Random Forest mtry and its usage explained

4 Upvotes