{"action":"opened","number":18,"pull_request":{"url":"https://api.github.com/repos/data-journalism/dj2016/pulls/18","id":87075145,"html_url":"https://github.com/data-journalism/dj2016/pull/18","diff_url":"https://github.com/data-journalism/dj2016/pull/18.diff","patch_url":"https://github.com/data-journalism/dj2016/pull/18.patch","issue_url":"https://api.github.com/repos/data-journalism/dj2016/issues/18","number":18,"state":"open","locked":false,"title":"homework2.md","user":{"login":"YutongFeng","id":22133092,"avatar_url":"https://avatars.githubusercontent.com/u/22133092?v=3","gravatar_id":"","url":"https://api.github.com/users/YutongFeng","html_url":"https://github.com/YutongFeng","followers_url":"https://api.github.com/users/YutongFeng/followers","following_url":"https://api.github.com/users/YutongFeng/following{/other_user}","gists_url":"https://api.github.com/users/YutongFeng/gists{/gist_id}","starred_url":"https://api.github.com/users/YutongFeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YutongFeng/subscriptions","organizations_url":"https://api.github.com/users/YutongFeng/orgs","repos_url":"https://api.github.com/users/YutongFeng/repos","events_url":"https://api.github.com/users/YutongFeng/events{/privacy}","received_events_url":"https://api.github.com/users/YutongFeng/received_events","type":"User","site_admin":false},"body":"# tryR\r\n# Jiyinchongzu\r\n# 20160926\r\n###########chapter1############\r\n1+1\r\n\"Arr, matey!\"\r\n6*7\r\n3 < 4\r\n2 + 2 == 5\r\nT == TRUE\r\nx <- 42\r\nx / 2\r\nx <- \"Arr, matey!\"\r\n\"Arr, matey!\"\r\nx <- TRUE\r\nsum(1, 3, 5)\r\nrep(\"Yo ho!\", times = 3)\r\nsqrt(16)\r\nhelp(sum)\r\nexample(min)\r\nhelp(rep)\r\nlist.files()\r\nsource(\"bottle1.R\")\r\nsource(\"bottle2.R\")\r\n\r\n###########chapter2############\r\n# start chapter2 below\r\nc(4, 7, 9)\r\nc('a', 'b', 'c')\r\n5:9\r\nseq(5, 9)\r\nseq(5, 9, 0.5)\r\n9:5\r\nsentence <- c('walk', 'the', 'plank')\r\nsentence[3]\r\nsentence[1]\r\nsentence[3] <- \"dog\"\r\nsentence[4] <- 'to'\r\nsentence[c(1, 3)]\r\nsentence[2:4]\r\nsentence[5:7] <- c('the', 'poop', 'deck')\r\nsentence[6]\r\nranks <- 1:3\r\nnames(ranks) <- c(\"first\", \"second\", \"third\")\r\nranks[\"first\"]\r\nranks[\"third\"] <- 4\r\nvesselsSunk <- c(4, 5, 1)\r\nbarplot(vesselsSunk)\r\nnames(vesselsSunk) <- c(\"England\", \"France\", \"Norway\")\r\nbarplot(vesselsSunk)\r\nbarplot(1:100)\r\na <- c(1, 2, 3)\r\na + 1\r\na / 2\r\na*2\r\nb <- c(4, 5, 6)\r\na + b\r\na-b\r\na == c(1, 99, 3)\r\na<b\r\nsin(a)\r\nsqrt(a)\r\nx <- seq(1, 20, 0.1)\r\ny <- sin(x)\r\nplot(x, y)\r\nvalues <- -10:10\r\nabsolutes <- abs(values)\r\nplot(values, absolutes)\r\na <- c(1, 3, NA, 7, 9)\r\nsum(a)\r\nhelp(sum)\r\nsum(a, na.rm = TRUE)\r\n\r\n###########chapter3############\r\n# start chapter3 below\r\nmatrix(0, 3, 4)\r\na <- 1:12\r\nprint(a)\r\nmatrix(a, 3, 4)\r\nplank <- 1:8\r\ndim(plank) <- c(2, 4)\r\nprint(plank)\r\nmatrix(1, 5, 5)\r\nprint(plank)\r\nplank[2, 3]\r\nplank[1,4]\r\nplank[1, 4] <- 0\r\nplank[2,]\r\nplank[, 4]\r\nplank[, 2:4]\r\nelevation <- matrix(1, 10, 10)\r\nelevation[4, 6] <- 0\r\ncontour(elevation)\r\npersp(elevation)\r\npersp(elevation, expand=0.2)\r\ncontour(volcano)\r\npersp(volcano, expand=0.2)\r\nimage(volcano)\r\n\r\n###########chapter4############\r\n# start chapter4 below\r\nlimbs <- c(4, 3, 4, 3, 2, 4, 4, 4)\r\nnames(limbs) <- c('One-Eye', 'Peg-Leg', 'Smitty', 'Hook', 'Scooter', 'Dan', 'Mikey', 'Blackbeard')\r\nmean(limbs)\r\nbarplot(limbs)\r\nmeanValue <- mean(pounds)\r\nabline(h = meanValue)\r\ndeviation <- sd(pounds)\r\nabline(h = meanValue + deviation)\r\nabline(h = meanValue - deviation)\r\n       ","created_at":"2016-09-28T08:29:41Z","updated_at":"2016-09-28T08:29:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/data-journalism/dj2016/pulls/18/commits","review_comments_url":"https://api.github.com/repos/data-journalism/dj2016/pulls/18/comments","review_comment_url":"https://api.github.com/repos/data-journalism/dj2016/pulls/comments{/number}","comments_url":"https://api.github.com/repos/data-journalism/dj2016/issues/18/comments","statuses_url":"https://api.github.com/repos/data-journalism/dj2016/statuses/e840ec691719900c1f5052d72b385fb11fb8a5ac","head":{"label":"YutongFeng:gh-pages","ref":"gh-pages","sha":"e840ec691719900c1f5052d72b385fb11fb8a5ac","user":{"login":"YutongFeng","id":22133092,"avatar_url":"https://avatars.githubusercontent.com/u/22133092?v=3","gravatar_id":"","url":"https://api.github.com/users/YutongFeng","html_url":"https://github.com/YutongFeng","followers_url":"https://api.github.com/users/YutongFeng/followers","following_url":"https://api.github.com/users/YutongFeng/following{/other_user}","gists_url":"https://api.github.com/users/YutongFeng/gists{/gist_id}","starred_url":"https://api.github.com/users/YutongFeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YutongFeng/subscriptions","organizations_url":"https://api.github.com/users/YutongFeng/orgs","repos_url":"https://api.github.com/users/YutongFeng/repos","events_url":"https://api.github.com/users/YutongFeng/events{/privacy}","received_events_url":"https://api.github.com/users/YutongFeng/received_events","type":"User","site_admin":false},"repo":{"id":67938538,"name":"dj2016","full_name":"YutongFeng/dj2016","owner":{"login":"YutongFeng","id":22133092,"avatar_url":"https://avatars.githubusercontent.com/u/22133092?v=3","gravatar_id":"","url":"https://api.github.com/users/YutongFeng","html_url":"https://github.com/YutongFeng","followers_url":"https://api.github.com/users/YutongFeng/followers","following_url":"https://api.github.com/users/YutongFeng/following{/other_user}","gists_url":"https://api.github.com/users/YutongFeng/gists{/gist_id}","starred_url":"https://api.github.com/users/YutongFeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YutongFeng/subscriptions","organizations_url":"https://api.github.com/users/YutongFeng/orgs","repos_url":"https://api.github.com/users/YutongFeng/repos","events_url":"https://api.github.com/users/YutongFeng/events{/privacy}","received_events_url":"https://api.github.com/users/YutongFeng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/YutongFeng/dj2016","description":"南京大学2016年《数据新闻》课程","fork":true,"url":"https://api.github.com/repos/YutongFeng/dj2016","forks_url":"https://api.github.com/repos/YutongFeng/dj2016/forks","keys_url":"https://api.github.com/repos/YutongFeng/dj2016/keys{/key_id}","collaborators_url":"https://api.github.com/repos/YutongFeng/dj2016/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/YutongFeng/dj2016/teams","hooks_url":"https://api.github.com/repos/YutongFeng/dj2016/hooks","issue_events_url":"https://api.github.com/repos/YutongFeng/dj2016/issues/events{/number}","events_url":"https://api.github.com/repos/YutongFeng/dj2016/events","assignees_url":"https://api.github.com/repos/YutongFeng/dj2016/assignees{/user}","branches_url":"https://api.github.com/repos/YutongFeng/dj2016/branches{/branch}","tags_url":"https://api.github.com/repos/YutongFeng/dj2016/tags","blobs_url":"https://api.github.com/repos/YutongFeng/dj2016/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/YutongFeng/dj2016/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/YutongFeng/dj2016/git/refs{/sha}","trees_url":"https://api.github.com/repos/YutongFeng/dj2016/git/trees{/sha}","statuses_url":"https://api.github.com/repos/YutongFeng/dj2016/statuses/{sha}","languages_url":"https://api.github.com/repos/YutongFeng/dj2016/languages","stargazers_url":"https://api.github.com/repos/YutongFeng/dj2016/stargazers","contributors_url":"https://api.github.com/repos/YutongFeng/dj2016/contributors","subscribers_url":"https://api.github.com/repos/YutongFeng/dj2016/subscribers","subscription_url":"https://api.github.com/repos/YutongFeng/dj2016/subscription","commits_url":"https://api.github.com/repos/YutongFeng/dj2016/commits{/sha}","git_commits_url":"https://api.github.com/repos/YutongFeng/dj2016/git/commits{/sha}","comments_url":"https://api.github.com/repos/YutongFeng/dj2016/comments{/number}","issue_comment_url":"https://api.github.com/repos/YutongFeng/dj2016/issues/comments{/number}","contents_url":"https://api.github.com/repos/YutongFeng/dj2016/contents/{+path}","compare_url":"https://api.github.com/repos/YutongFeng/dj2016/compare/{base}...{head}","merges_url":"https://api.github.com/repos/YutongFeng/dj2016/merges","archive_url":"https://api.github.com/repos/YutongFeng/dj2016/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/YutongFeng/dj2016/downloads","issues_url":"https://api.github.com/repos/YutongFeng/dj2016/issues{/number}","pulls_url":"https://api.github.com/repos/YutongFeng/dj2016/pulls{/number}","milestones_url":"https://api.github.com/repos/YutongFeng/dj2016/milestones{/number}","notifications_url":"https://api.github.com/repos/YutongFeng/dj2016/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/YutongFeng/dj2016/labels{/name}","releases_url":"https://api.github.com/repos/YutongFeng/dj2016/releases{/id}","deployments_url":"https://api.github.com/repos/YutongFeng/dj2016/deployments","created_at":"2016-09-11T15:45:01Z","updated_at":"2016-09-11T15:45:02Z","pushed_at":"2016-09-28T08:18:14Z","git_url":"git://github.com/YutongFeng/dj2016.git","ssh_url":"git@github.com:YutongFeng/dj2016.git","clone_url":"https://github.com/YutongFeng/dj2016.git","svn_url":"https://github.com/YutongFeng/dj2016","homepage":"http://data-journalism.github.io/dj2016/","size":2668,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"gh-pages"}},"base":{"label":"data-journalism:gh-pages","ref":"gh-pages","sha":"787f6b44d8a8fb770e7f201e13e773a137f1ac81","user":{"login":"data-journalism","id":14106800,"avatar_url":"https://avatars.githubusercontent.com/u/14106800?v=3","gravatar_id":"","url":"https://api.github.com/users/data-journalism","html_url":"https://github.com/data-journalism","followers_url":"https://api.github.com/users/data-journalism/followers","following_url":"https://api.github.com/users/data-journalism/following{/other_user}","gists_url":"https://api.github.com/users/data-journalism/gists{/gist_id}","starred_url":"https://api.github.com/users/data-journalism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/data-journalism/subscriptions","organizations_url":"https://api.github.com/users/data-journalism/orgs","repos_url":"https://api.github.com/users/data-journalism/repos","events_url":"https://api.github.com/users/data-journalism/events{/privacy}","received_events_url":"https://api.github.com/users/data-journalism/received_events","type":"Organization","site_admin":false},"repo":{"id":67041696,"name":"dj2016","full_name":"data-journalism/dj2016","owner":{"login":"data-journalism","id":14106800,"avatar_url":"https://avatars.githubusercontent.com/u/14106800?v=3","gravatar_id":"","url":"https://api.github.com/users/data-journalism","html_url":"https://github.com/data-journalism","followers_url":"https://api.github.com/users/data-journalism/followers","following_url":"https://api.github.com/users/data-journalism/following{/other_user}","gists_url":"https://api.github.com/users/data-journalism/gists{/gist_id}","starred_url":"https://api.github.com/users/data-journalism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/data-journalism/subscriptions","organizations_url":"https://api.github.com/users/data-journalism/orgs","repos_url":"https://api.github.com/users/data-journalism/repos","events_url":"https://api.github.com/users/data-journalism/events{/privacy}","received_events_url":"https://api.github.com/users/data-journalism/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/data-journalism/dj2016","description":"南京大学2016年《数据新闻》课程","fork":false,"url":"https://api.github.com/repos/data-journalism/dj2016","forks_url":"https://api.github.com/repos/data-journalism/dj2016/forks","keys_url":"https://api.github.com/repos/data-journalism/dj2016/keys{/key_id}","collaborators_url":"https://api.github.com/repos/data-journalism/dj2016/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/data-journalism/dj2016/teams","hooks_url":"https://api.github.com/repos/data-journalism/dj2016/hooks","issue_events_url":"https://api.github.com/repos/data-journalism/dj2016/issues/events{/number}","events_url":"https://api.github.com/repos/data-journalism/dj2016/events","assignees_url":"https://api.github.com/repos/data-journalism/dj2016/assignees{/user}","branches_url":"https://api.github.com/repos/data-journalism/dj2016/branches{/branch}","tags_url":"https://api.github.com/repos/data-journalism/dj2016/tags","blobs_url":"https://api.github.com/repos/data-journalism/dj2016/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/data-journalism/dj2016/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/data-journalism/dj2016/git/refs{/sha}","trees_url":"https://api.github.com/repos/data-journalism/dj2016/git/trees{/sha}","statuses_url":"https://api.github.com/repos/data-journalism/dj2016/statuses/{sha}","languages_url":"https://api.github.com/repos/data-journalism/dj2016/languages","stargazers_url":"https://api.github.com/repos/data-journalism/dj2016/stargazers","contributors_url":"https://api.github.com/repos/data-journalism/dj2016/contributors","subscribers_url":"https://api.github.com/repos/data-journalism/dj2016/subscribers","subscription_url":"https://api.github.com/repos/data-journalism/dj2016/subscription","commits_url":"https://api.github.com/repos/data-journalism/dj2016/commits{/sha}","git_commits_url":"https://api.github.com/repos/data-journalism/dj2016/git/commits{/sha}","comments_url":"https://api.github.com/repos/data-journalism/dj2016/comments{/number}","issue_comment_url":"https://api.github.com/repos/data-journalism/dj2016/issues/comments{/number}","contents_url":"https://api.github.com/repos/data-journalism/dj2016/contents/{+path}","compare_url":"https://api.github.com/repos/data-journalism/dj2016/compare/{base}...{head}","merges_url":"https://api.github.com/repos/data-journalism/dj2016/merges","archive_url":"https://api.github.com/repos/data-journalism/dj2016/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/data-journalism/dj2016/downloads","issues_url":"https://api.github.com/repos/data-journalism/dj2016/issues{/number}","pulls_url":"https://api.github.com/repos/data-journalism/dj2016/pulls{/number}","milestones_url":"https://api.github.com/repos/data-journalism/dj2016/milestones{/number}","notifications_url":"https://api.github.com/repos/data-journalism/dj2016/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/data-journalism/dj2016/labels{/name}","releases_url":"https://api.github.com/repos/data-journalism/dj2016/releases{/id}","deployments_url":"https://api.github.com/repos/data-journalism/dj2016/deployments","created_at":"2016-08-31T13:50:44Z","updated_at":"2016-09-27T11:45:27Z","pushed_at":"2016-09-28T07:25:39Z","git_url":"git://github.com/data-journalism/dj2016.git","ssh_url":"git@github.com:data-journalism/dj2016.git","clone_url":"https://github.com/data-journalism/dj2016.git","svn_url":"https://github.com/data-journalism/dj2016","homepage":"http://data-journalism.github.io/dj2016/","size":3023,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":17,"mirror_url":null,"open_issues_count":5,"forks":17,"open_issues":5,"watchers":4,"default_branch":"gh-pages"}},"_links":{"self":{"href":"https://api.github.com/repos/data-journalism/dj2016/pulls/18"},"html":{"href":"https://github.com/data-journalism/dj2016/pull/18"},"issue":{"href":"https://api.github.com/repos/data-journalism/dj2016/issues/18"},"comments":{"href":"https://api.github.com/repos/data-journalism/dj2016/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/data-journalism/dj2016/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/data-journalism/dj2016/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/data-journalism/dj2016/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/data-journalism/dj2016/statuses/e840ec691719900c1f5052d72b385fb11fb8a5ac"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":231,"deletions":0,"changed_files":4}}
{"actor":{"display_login":"YutongFeng"}}