Data in R
To run your code, click run. It will let you know if your code is correct or not, and will offer hints on what to fix if needed. If you are stuck, you can see the solution by clicking Solution.
Exercise 1: Data types
eyJsYW5ndWFnZSI6InIiLCJwcmVfZXhlcmNpc2VfY29kZSI6IiMgbm8gcGVjIiwic2FtcGxlIjoiIyBQaWNrIGEgY29tcGFueSBhbmQgYXNzaWduIGl0J3MgbmFtZSB0byBjb21wYW55X25hbWVcbmNvbXBhbnlfbmFtZSA8LSBcblxuIyBBc3NpZ24gYSBib29sZWFuIHZhbHVlIHRvIGlzX3RlY2hfZmlybVxuaXNfdGVjaF9maXJtIDwtIFxuXG4jIEFzc2lnbiBhIG51bWVyaWMgdmFsdWUgdG8gcmV2ZW51ZVxucmV2ZW51ZSA8LSBcblxuIyBBc3NpZ24gYSBkZXNjcmlwdGlvbiBvZiB0aGUgZmlybSB0byBjb21wYW55X2Rlc2NcbmNvbXBhbnlfZGVzYyA8LSBcIlwiXG5cbiNFTkQiLCJzb2x1dGlvbiI6IiMgQXNzaWduIGEgY2hhcmFjdGVyIHZhbHVlIHRvIGNvbXBhbnlfbmFtZVxuY29tcGFueV9uYW1lIDwtIFwiR29vZ2xlXCJcblxuIyBBc3NpZ24gYSBib29sZWFuIHZhbHVlIHRvIGlzX3RlY2hfZmlybVxuaXNfdGVjaF9maXJtIDwtIFRSVUVcblxuIyBBc3NpZ24gYSBudW1lcmljIHZhbHVlIHRvIHJldmVudWVcbnJldmVudWUgPC0gNDAwMDBcblxuIyBBc3NpZ24gYSBkZXNjcmlwdGlvbiBvZiB0aGUgZmlybSB0byBjb21wYW55X2Rlc2NcbmNvbXBhbnlfZGVzYyA8LSBcIlN0YXJ0ZWQgd2l0aCBzZWFyY2gsIGJ1dCBpcyBub3cgZXZlcnl3aGVyZVwiXG5cbiNFTkQiLCJzY3QiOiIjIFRlbXBsYXRlIGJhc2VkIG9uIGh0dHBzOi8vd3d3LnJkb2N1bWVudGF0aW9uLm9yZy9wYWNrYWdlcy90ZXN0d2hhdC92ZX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Wx0LCB0ZXN0X2V4cHJlc3Npb25fcmVzdWx0In0=
Exercise 6: External library usage
Click the expand button to see the plot more clearly (note: may be blocked by pop-up blockers)
eyJsYW5ndWFnZSI6InIiLCJwcmVfZXhlcmNpc2VfY29kZSI6ImRmIDwtIHJlYWQuY3N2KHRleHQ9XCJndmtleSxkYXRhZGF0ZSxmeWVhcix0aWMsY29ubSxhdCxkcHRjLGx0LG5pXG4zMjQzLDIwMTAxMjMxLDIwMTAsQyxDSVRJR1JPVVAgSU5DLDE5MTM5MDIsODQ0OTY4LDE3NDgxMTMsMTA2MDJcbjMyNDMsMjAxMTEyMzEsMjAxMSxDLENJVElHUk9VUCBJTkMsMTg3Mzg3OCw4NjU5MzYsMTY5NDMwNSwxMTA2N1xuMzI0MywyMDEyMTIzMSwyMDEyLEMsQ0lUSUdST1VQIElOQywxODY0NjYwLDkzMDU2MCwxNjczNjYzLDc1NDFcbjMyNDMsMjAxMzEyMzEsMjAxMyxDLENJVElHUk9VUCBJTkMsMTg4MDM4Miw5NjgyNzMsMTY3NDI0OSwxMzY3M1xuMzI0MywyMDE0MTIzMSwyMDE0LEMsQ0lUSUdST1VQIElOQywxODQyNTMwLDg5OTMzMiwxNjMwNDg1LDczMTNcbjMyNDMsMjAxNTEyMzEsMjAxNSxDLENJVElHUk9VUCBJTkMsMTczMTIxMCw5MDc4ODcsMTUwODExOCwxNzI0MlxuMzI0MywyMDE2MTIzMSwyMDE2LEMsQ0lUSUdST1VQIElOQywxNzkyMDc3LDkyOTQwNiwxNTY1OTM0LDE0OTEyXG4zMjQzLDIwMTcxMjMxLDIwMTcsQyxDSVRJR1JPVVAgSU5DLDE4NDI0NjUsOTU5ODIyLDE2NDA3OTMsLTY3OThcbjExNDYyOCwyMDEwMTIzMSwyMDEwLEdTLEdPTERNQU4gU0FDSFMgR1JPVVAgSU5DLDkxMTMzMiwzODU2OSw4MzMxMDQsODM1NFxuMTE0NjI4LDIwMTExMjMxLDIwMTEsR1MsR09MRE1BTiBTQ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