Why is runGitHub throwing an error on my public github repo containing a working shinyapp? - r

I've got a working shiny-app published (today) on a public Github repo:
I tried the line below to run the app from a script but get the following error.
shiny::runGitHub(repo = "<repo>",
username = "<username>")
# I have also tried:
# shiny::runGitHub(repo = "<username>/<repo>")
Downloading https://github.com/<username>/<repo>/archive/master.tar.gz
Error in utils::download.file(url, method = method, ...) :
cannot open URL 'https://github.com/<username>/<repo>/archive/master.tar.gz'
Any ideas why this could be happening?

The solution that worked came from here:
https://community.rstudio.com/t/run-shiny-app-from-github-repository/89839
The key is the argument ref="main"
shiny::runGitHub(repo = "<repo>",username = "<username >",ref="main")

Related

Errors running Oolong validation in R on both STM and seededLDA

I'm trying to run the oolong package to validate a couple of topic models I've created. Using both an STM model and a seededLDA model (this code won't be reproducible)
oolong_test1a <- witi(input_model = model_stm_byt, input_corpus = YS$body)
OR
oolong_test1a <- witi(input_model = slda_howard_docs, input_corpus = howard_df$content)
In both cases it successfully creates an oolong test in my global environment. However, when I run either the word intrusion or topic intrusion test, I get this error in both my console and my viewer:
Listening on http://127.0.0.1:7122
Warning: Error in value[[3L]]: Couldn't normalize path in `addResourcePath`, with arguments: `prefix` = 'miniUI-0.1.1.1'; `directoryPath` = 'D:/temp/RtmpAh8J5r/RLIBS_35b54642a1c09/miniUI/www'
[No stack trace available]
I couldn't find any reference to this error anywhere else. I've checked I'm running the most recent version of oolong.
I've also tried to run it on the models/corpus that comes supplied with oolong. So this code is reproducible:
oolong_test <- witi(input_model = abstracts_keyatm, input_corpus = abstracts$text, userid = "Julia")
oolong_test$do_word_intrusion_test()
oolong_test$do_topic_intrusion_test()
This generates the same errors.
There is a new version in github that fixes this issue.
devtools::install_github("chainsawriot/oolong")

RHRV package error while running the tutorial

I am trying to use RHRV package for creating an app. when I run the code:
hrv.data = LoadBeatAscii(hrv.data, "example.beats",RecordPath = "beatsFolder")
I get an error
Error in setwd(RecordPath) : cannot change working directory.
What could be the issue ?
enter in "beatsfolder" then, run above command like hrv.data = LoadBeatAscii(hrv.data, "example.beats"). It worked for me.

why is getMyConnections() function of Rlinkedin package in R not working?

> in.oauth<-inOAuth(application_name ="RP",consumer_key ="xxx",consumer_secret = "xxx")
If you've created you're own application, be sure to copy and paste the following into
'OAuth 2.0 Redirect URLs' in the LinkedIn Application Details: http://localhost:1410/
Authentication complete.
my.connections <- getMyConnections(in.oauth)
The following error is appearing when the above function is getting executed in rstudio.
Error in x.list[sapply(x.list, is.list)] <- NA :
invalid subscript type 'list'
Check this link. Only
getProfile, searchCompanies and submitShare function works as per now

Unable to read an SBML file in SBMLR

I'm trying to read a SBML file (Test.xml) using the R package SBMLR. Below is the code I executed.
library(SBMLR)
file <- system.file("models","Test.xml",package = "SBMLR")
doc <- readSBML(file)
When I execute the 3rd line I get an error message saying:
Error in xmlEventParse(filename, handlers = sbmlHandler(),
ignoreBlanks = TRUE) : File does not exist
I have tried to read the file using rsbml library as well.. But still I'm getting an error saying
Error: File unreadable.
I'm following this guide at the moment. Any help regarding the issue is highly appreciated!

issue with get_rollit_source

I tried to use get_rollit_source from the RcppRoll package as follows:
library(RcppRoll)
get_rollit_source(roll_max,edit=TRUE,RStudio=TRUE)
I get an error:
Error in get("outFile", envir = environment(fun)) :
object 'outFile' not found
I tried
outFile="C:/myDir/Test.cpp"
get_rollit_source(roll_max,edit=TRUE,RStudio=FALSE,outFile=outFile)
I get an error:
Error in get_rollit_source(roll_max, edit = TRUE, RStudio = FALSE, outFile = outFile) :
File does not exist!
How can fix this issue?
I noticed that the RcppRoll folder in the R library doesn't contain any src directory. Should I download it?
get_rollit_source only works for 'custom' functions. For things baked into the package, you could just download + read the source code (you can download the source tarball here, or go to the GitHub repo).
Anyway, something like the following should work:
rolling_sqsum <- rollit(final_trans = "x * x")
get_rollit_source(rolling_sqsum)
(I wrote this package quite a while back when I was still learning R / Rcpp so there are definitely some rough edges...)

Resources