Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I call this R function written by someone else?

Tags:

r

I am starting with R and came across this function written by someone, on the internet. The link is this

https://gist.githubusercontent.com/fawda123/5086859/raw/17fd6d2adec4dbcf5ce750cbd1f3e0f4be9d8b19/nnet_plot_fun.r

Now, if I want to download this file and then call the method, where should I download and store this file? How can I make a call to this method?

like image 466
London guy Avatar asked Feb 12 '23 17:02

London guy


2 Answers

Or, Try

# install.packages("devtools")
library(devtools)
source_gist(5086859)
plot.nnet
like image 158
David Arenburg Avatar answered Feb 24 '23 02:02

David Arenburg


# just run this line your first time to install the package
# install.packages( "downloader" )

# the downloader package makes it easy to pull code from github
library(downloader)
source_url( "https://gist.githubusercontent.com/fawda123/5086859/raw/17fd6d2adec4dbcf5ce750cbd1f3e0f4be9d8b19/nnet_plot_fun.r" , prompt = FALSE )

# there you have it
plot.nnet
like image 29
Anthony Damico Avatar answered Feb 24 '23 03:02

Anthony Damico