Reputation: 4295
I am trying to publish to rpubs a html file generated from a rmd using knithtml. However, the knitting takes too long to run and i would not want to rerun the whole knit process again just to make minor changes to the appearance of the html document.
I cannot seem to find the publish button the moment i close the html file and reopen it again.
Upvotes: 6
Views: 1673
Reputation: 120
Execute Following Commands- First set the PATH then execute other commands
setwd("C:/Users/MK10181/Desktop")
result <- rpubsUpload(title='SPC',contentFile='Report.html', originalDoc = 'Report.html')
result
$id
[1] "https://api.rpubs.com/api/v1/document/507696/c26dc92b5fe046488a4bfa8c670dab26"
$continueUrl
[1] "http://rpubs.com/publish/claim/507696/dc025c9952da401db86aef1f0f234734"
browseURL(result$continueUrl)
After this Your RPub's accounts page will open in the browser then you will see your document.
Upvotes: 0
Reputation: 302
Install the package markdown
then you can try the code:
result <- rpubsUpload(title='Your title',htmlFile='your_html_file_and_path.html',method=getOption('rpubs.upload.method','auto')
A successful upload would return 2 values in result
, which are website addresses. Copy and paste the continueUrl
into your browser to complete the upload.
Or you can use the function:
browseURL(result$continueUrl)
to go straight the webpage using the default browser.
Note that I am sure there is an automated way of uploading without using the browser but this is the only way I know right now.
Upvotes: 4