Hyperlink a pdf on local drive to rmarkdown html output - r

I am trying to make the citation of my report in rmarkdown to hyperlinks of the pdfs. I try the following:
[the citation](thefile.pdf)
This works on my computer but if I send it to someone else the links don't work. I understand that I am not doing this properly, but this is how I do it for URLs. Is there any way I can have these pdfs attached to the rmarkdown?

You would need to upload your pdf's to the internet somewhere, and then put that link in the parentheses in the code snippet in your post. That code you posted would only work if the person had the same file in the same place on their computer.
[Your file](A google drive/dropbox link)

Related

Linking to other pages on Simple R markdown website

I'm developing a Simple R Markdown Website, and want to include a few links to other .Rmd generated HTML pages on the home page.
Simply, I want to open up "detailed-desc.html" which is rendered from "detailed-desc.Rmd", on clicking a text element on the "index.Rmd" file. I'm not sure how this can be done.
If all your .Rmd files and their rendered HTML results are in the same directory, then you can use the regular markdown syntax and reference the HTML files for links.
[Detailed Description](detailed-desc.html)
Detailed Description
With a more complicated site folder structure, it is just
[Detailed Description](./path/to/your/folder/detailed-desc.html)
Detailed Description

Here() function doesn't change its directory after pushing the source code to github

I am writing a Rmd file, where it contains some knitted images. The Rmd file shows stuffs just as expected when looking at them on my own computer, but it cannot show the inserted images when uploaded to my github.
To knit the inserted images, I used here() function:
knitr::include_graphics(c(here("data/images/experiments_areaId2ad4/plots", "scatter_old.png"), here("data/images/experiments_areaId2ad4/plots", "scatter_new.png")))
On the github, the images cannot be shown, and as most html, there are tiny placeholders at the positions of each of the images. When I clicked on one of the place holder, it led me to a webpage that was 404.
I looked at the URL, it is like:
https://github.com/[my_github_account]/[my_github_repo]/blob/master/Users/[myname]/Desktop/[my_local_path]/[my_github_repo]/my_reports/data/images/experiments_areaId2ad4/plots/scatter_new.png
Obviously it has copied my local path from my computer to the github, so that the paths of these images are definitely not valid anymore.
However, I still want to use the here() function, so that when my collaborators pull my github updates, they can still interact with my projects without having to worry about screwing up directory.
Does anyone have a suggestion?
Thanks!

How to use the embed code provided by Tableau in Drupal 8

I'm trying to embed a tableau visualization onto a block created in Drupal 8. I've tried use one of the example tableau visualizations available here. Clicking on share on the on the tableau visual provides an embed code and I tried copying and pasting that embed code into a basic page with full html option in Drupal 8, but I don't see the visualization rendered. Instead the pasted content gets displayed as it is. How should i get this working?
I just figured one way of doing this. Copy the embed code onto a .html file and place it in the drupal web directory - in htdocs. On the content have a provide a hyperlink to the .html file. and there... it works!
Just goto clicked Content >>Add Content>>Basic Page. and then in text editor click source button, then copy paste your tableau embedded code and click save & publish. then goto website and see the result.

How do I host an interactive (shiny) knitr/rmarkdown doc on GitHub Pages?

I have an .rmd file containing working code for a Shiny interactive knitr/rmarkdown doc. I want this doc to run via GitHub pages.
How do I do this? (Can someone walk me through the steps clearly and fully).
I understand I have to create a gh-pages branch and upload the files there. However, I don't understand what to do with my .rmd file. Do I simply just resave it as an .html file? Or does an html file have to contain something in addition to the rmd file?
Please help explain this to me -- I've spent all day trying to figure this out, but I can;t get anything to work right :(.
Prior effort: I tried following the lead given by this SO.post, but the best I can get is a screen full of block text. No formatting, code or images show up. Just the whole document's text.

R knitr html file picture locations when compiling through RStudio

When I make my knitr document, I see the html file in my directory. I load the file and it looks great.
However, I'm curious where the pictures are:
It gives me locations like:
img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACQAAAAYACAYAAAAjFnetAAAEJGlDQ1BJQ0MgUHJvZmlsZQAAOBGFVd9v21QUPolvUqQWPyBYR4eKxa9VU1u5GxqtxgZJk6XtShal6dgqJOQ6N4mpGwfb6baqT3uBNwb8AUDZAw9IPCENBmJ72fbAtElThyqqSUh76MQ ...."
Where exactly is the image?
This IS the image directly encoded in html. http://en.wikipedia.org/wiki/Data_URI_scheme
see f.e. this stack overflow question: Embedding Base64 Images
kind greetings

Resources