DS4PS / ddmp-uw-class-spring-2019

Data-Driven Management & Policy Course at UW, Spring 2019
https://ds4ps.github.io/ddmp-uw-class-spring-2019/
4 stars 3 forks source link

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

Open boyaow opened 5 years ago

boyaow commented 5 years ago

1. 屏幕快照 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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

I think i understand.