Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about the dataset and how to insert a picture #2

Open
boyaow opened this issue Apr 3, 2019 · 6 comments
Open

Question about the dataset and how to insert a picture #2

boyaow opened this issue Apr 3, 2019 · 6 comments

Comments

@boyaow
Copy link

boyaow commented Apr 3, 2019

屏幕快照 2019-04-03 下午2 21 48
Why is some datasets in the category of "Data" and others in the category of "Value"? What does "Promise"mean?
2.
屏幕快照 2019-04-03 下午2 36 53

屏幕快照 2019-04-03 下午4 20 03
I try to insert the picture in the markdown but an error still shows up. Looking back at the code, there seems no problem because the picture appear right under the code. What is the problem?
Thank you.

@lecy
Copy link
Contributor

lecy commented Apr 4, 2019

Promise means the dataset exists in R, but has not yet been loaded. If you type for example:

summary( crimtab )

You will see the "promise" turns into the meta-data you see for others.


Regarding your picture, I think the tilde is confusing R. When you knit, R will always look for the file in the same directory as the RMD file. If it's in a folder on the desktop, for example, you would write:

![](images/me.png)

The tilde ~ tells the program to start from the base directory (usually C:). The real-time preview might understand that convention, but the knitr package does not, which is why you get the error.

@boyaow
Copy link
Author

boyaow commented Apr 4, 2019

Thank you for your help and instructions. I tried the code ![](images/me.png)but it still shows no path for the image, is there anything wrong? I am confused.
屏幕快照 2019-04-03 下午7 33 27

@lecy
Copy link
Contributor

lecy commented Apr 4, 2019

Where is your RMD file and image file? Is the images folder inside the same folder as your RMD file?

RMD
images/me.png

@boyaow
Copy link
Author

boyaow commented Apr 4, 2019

My RMD file and image file are in different folders so do I have tp put the images folder in the same folder as my RMD file? Thank you.

@ejvanholm
Copy link
Collaborator

Right, I should have clarified in class that RMD files have local awareness. So they look for the files you link to in the same folder. The easiest way to move forward is to copy whatever picture you want to use into the same folder your Rmarkdown is saving to.

The other option that is straightforward is to use a picture on the internet, you can just copy the weblink for that image using the same structure .

@boyaow
Copy link
Author

boyaow commented Apr 4, 2019

I think i understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants