How to trigger R code from excel? [closed] - r

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I want to trigger R code from an excel spreadsheet. I couldn't find any options other than Rexcel. Is there any alternative or simpler way to do this (may be use VBA)?

In VBA you can call any command line programs, so you can call R in batch mode.
Call Shell("R --vanilla scriptfile.R outputfile.txt")

Related

how can I share my interactive map made in R? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I did an interactive using ggplot2 and ggplotly. How can I share it with another person?
Thanks,
As far as I know ,first store it in an R variable, and install the htmlwidget package and use saveWidget() function to save your object to a file as below:
saveWidget(object_name, file="map.html")

how do i run an excecutable file for r from github [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I know this is an extremely basic question, but someone suggested i try running a code from github and I have no idea how to go about it
I tried copying and pasting but that didn't work and neither does downloading it and trying to open it with R.
You can click the raw button on github to get the url
source("https://raw.githubusercontent.com/amignan/risk_eq_mmax/master/get_mmax.R")

How to read .mod file in R? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have stored the model in .mod extension.
Now I have to read the file.
Tried installing ProTrackR package and read using read.module.
But not able to read the file.
You can try
read.module(filename, ignore.validity = F)

How to modify a function in local R package? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have an R package made by someone else. I want to add an additional function to it, how can I do that?
To change a function from a given package, you'll probably need trace function, it helps you edit and modify a function F
trace("F",edit=TRUE)
it will open a small window for you to modify the code, but it won't change the actual source code permanently.
you can copy and paste the code and create a new function with your own modifications.

Can you run R code on a .md file? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I'm new to R, so this might be a stupid question but I'd appreciate any help.
Can you execute code on a .md file? I know that you can include code, but it doesn't show the output like it does in a .Rmd file. Am I doing something wrong?
Thanks!

Resources