{"action":"created","comment":{"url":"https://api.github.com/repos/DataPoints/DataPoints/pulls/comments/26000519","id":26000519,"diff_hunk":"@@ -0,0 +1,45 @@\n+library(RPostgreSQL)\n+\n+# funkcia nacita ulozeny csv subor do framu\n+readCSV = function(f){\n+\tcsv <- read.csv(file=f, sep=\";\")\n+\treturn(csv)\n+}\n+\n+# funkcia vyberie ciselne stlpce a spravi nad nimi statisticke funkcie, ktore zoskupi do summary framu\n+analyze = function(csv){\n+\tnums <- sapply(csv, is.numeric)\n+\tmin <- apply(csv[nums], 2, min)\n+\tmax <- apply(csv[nums], 2, max)\n+\tmedian <- apply(csv[nums], 2, median)\n+\tmean <- apply(csv[nums], 2, mean)\n+\n+\tsummary <- rbind(min, max, median, mean)\n+\treturn(summary)\n+}\n+\n+# funkcia vezme summary frame a vlozi jeho hodnoty do tabulky\n+DBinsert = function(summary, dataset_id){\n+\tdrv <- dbDriver(\"PostgreSQL\")\n+\tcon <- dbConnect(drv, dbname=\"Skola_development\")","path":"app/lib/r/analyze.R","position":24,"original_position":24,"commit_id":"b051f85930933b85c73458deb225282536c7f013","original_commit_id":"b051f85930933b85c73458deb225282536c7f013","user":{"login":"PeterUherek","id":4981234,"avatar_url":"https://avatars.githubusercontent.com/u/4981234?v=3","gravatar_id":"","url":"https://api.github.com/users/PeterUherek","html_url":"https://github.com/PeterUherek","followers_url":"https://api.github.com/users/PeterUherek/followers","following_url":"https://api.github.com/users/PeterUherek/following{/other_user}","gists_url":"https://api.github.com/users/PeterUherek/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterUherek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterUherek/subscriptions","organizations_url":"https://api.github.com/users/PeterUherek/orgs","repos_url":"https://api.github.com/users/PeterUherek/repos","events_url":"https://api.github.com/users/PeterUherek/events{/privacy}","received_events_url":"https://api.github.com/users/PeterUherek/received_events","type":"User","site_admin":false},"body":"Tento riadok asi nepobezi na produkcnej verzii ...Treba dat vediet chalanom ked to budu nasadzovat co tam treba doplnit ","created_at":"2015-03-07T23:16:48Z","updated_at":"2015-03-07T23:16:48Z","html_url":"https://github.com/DataPoints/DataPoints/pull/38#discussion_r26000519","pull_request_url":"https://api.github.com/repos/DataPoints/DataPoints/pulls/38","_links":{"self":{"href":"https://api.github.com/repos/DataPoints/DataPoints/pulls/comments/26000519"},"html":{"href":"https://github.com/DataPoints/DataPoints/pull/38#discussion_r26000519"},"pull_request":{"href":"https://api.github.com/repos/DataPoints/DataPoints/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/DataPoints/DataPoints/pulls/38","id":30709203,"html_url":"https://github.com/DataPoints/DataPoints/pull/38","diff_url":"https://github.com/DataPoints/DataPoints/pull/38.diff","patch_url":"https://github.com/DataPoints/DataPoints/pull/38.patch","issue_url":"https://api.github.com/repos/DataPoints/DataPoints/issues/38","number":38,"state":"open","locked":false,"title":"Feature#607 analyza datasetu v r","user":{"login":"martinlosak","id":9248726,"avatar_url":"https://avatars.githubusercontent.com/u/9248726?v=3","gravatar_id":"","url":"https://api.github.com/users/martinlosak","html_url":"https://github.com/martinlosak","followers_url":"https://api.github.com/users/martinlosak/followers","following_url":"https://api.github.com/users/martinlosak/following{/other_user}","gists_url":"https://api.github.com/users/martinlosak/gists{/gist_id}","starred_url":"https://api.github.com/users/martinlosak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinlosak/subscriptions","organizations_url":"https://api.github.com/users/martinlosak/orgs","repos_url":"https://api.github.com/users/martinlosak/repos","events_url":"https://api.github.com/users/martinlosak/events{/privacy}","received_events_url":"https://api.github.com/users/martinlosak/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-07T20:57:14Z","updated_at":"2015-03-07T23:16:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7fe69bd4dcc392a04079648d755f0a5509ee2825","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DataPoints/DataPoints/pulls/38/commits","review_comments_url":"https://api.github.com/repos/DataPoints/DataPoints/pulls/38/comments","review_comment_url":"https://api.github.com/repos/DataPoints/DataPoints/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DataPoints/DataPoints/issues/38/comments","statuses_url":"https://api.github.com/repos/DataPoints/DataPoints/statuses/b051f85930933b85c73458deb225282536c7f013","head":{"label":"DataPoints:Feature#607_Analyza_datasetu_v_R","ref":"Feature#607_Analyza_datasetu_v_R","sha":"b051f85930933b85c73458deb225282536c7f013","user":{"login":"DataPoints","id":9219979,"avatar_url":"https://avatars.githubusercontent.com/u/9219979?v=3","gravatar_id":"","url":"https://api.github.com/users/DataPoints","html_url":"https://github.com/DataPoints","followers_url":"https://api.github.com/users/DataPoints/followers","following_url":"https://api.github.com/users/DataPoints/following{/other_user}","gists_url":"https://api.github.com/users/DataPoints/gists{/gist_id}","starred_url":"https://api.github.com/users/DataPoints/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataPoints/subscriptions","organizations_url":"https://api.github.com/users/DataPoints/orgs","repos_url":"https://api.github.com/users/DataPoints/repos","events_url":"https://api.github.com/users/DataPoints/events{/privacy}","received_events_url":"https://api.github.com/users/DataPoints/received_events","type":"Organization","site_admin":false},"repo":{"id":25229255,"name":"DataPoints","full_name":"DataPoints/DataPoints","owner":{"login":"DataPoints","id":9219979,"avatar_url":"https://avatars.githubusercontent.com/u/9219979?v=3","gravatar_id":"","url":"https://api.github.com/users/DataPoints","html_url":"https://github.com/DataPoints","followers_url":"https://api.github.com/users/DataPoints/followers","following_url":"https://api.github.com/users/DataPoints/following{/other_user}","gists_url":"https://api.github.com/users/DataPoints/gists{/gist_id}","starred_url":"https://api.github.com/users/DataPoints/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataPoints/subscriptions","organizations_url":"https://api.github.com/users/DataPoints/orgs","repos_url":"https://api.github.com/users/DataPoints/repos","events_url":"https://api.github.com/users/DataPoints/events{/privacy}","received_events_url":"https://api.github.com/users/DataPoints/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DataPoints/DataPoints","description":"DataPoints","fork":false,"url":"https://api.github.com/repos/DataPoints/DataPoints","forks_url":"https://api.github.com/repos/DataPoints/DataPoints/forks","keys_url":"https://api.github.com/repos/DataPoints/DataPoints/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataPoints/DataPoints/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataPoints/DataPoints/teams","hooks_url":"https://api.github.com/repos/DataPoints/DataPoints/hooks","issue_events_url":"https://api.github.com/repos/DataPoints/DataPoints/issues/events{/number}","events_url":"https://api.github.com/repos/DataPoints/DataPoints/events","assignees_url":"https://api.github.com/repos/DataPoints/DataPoints/assignees{/user}","branches_url":"https://api.github.com/repos/DataPoints/DataPoints/branches{/branch}","tags_url":"https://api.github.com/repos/DataPoints/DataPoints/tags","blobs_url":"https://api.github.com/repos/DataPoints/DataPoints/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataPoints/DataPoints/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataPoints/DataPoints/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataPoints/DataPoints/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataPoints/DataPoints/statuses/{sha}","languages_url":"https://api.github.com/repos/DataPoints/DataPoints/languages","stargazers_url":"https://api.github.com/repos/DataPoints/DataPoints/stargazers","contributors_url":"https://api.github.com/repos/DataPoints/DataPoints/contributors","subscribers_url":"https://api.github.com/repos/DataPoints/DataPoints/subscribers","subscription_url":"https://api.github.com/repos/DataPoints/DataPoints/subscription","commits_url":"https://api.github.com/repos/DataPoints/DataPoints/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataPoints/DataPoints/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataPoints/DataPoints/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataPoints/DataPoints/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataPoints/DataPoints/contents/{+path}","compare_url":"https://api.github.com/repos/DataPoints/DataPoints/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataPoints/DataPoints/merges","archive_url":"https://api.github.com/repos/DataPoints/DataPoints/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataPoints/DataPoints/downloads","issues_url":"https://api.github.com/repos/DataPoints/DataPoints/issues{/number}","pulls_url":"https://api.github.com/repos/DataPoints/DataPoints/pulls{/number}","milestones_url":"https://api.github.com/repos/DataPoints/DataPoints/milestones{/number}","notifications_url":"https://api.github.com/repos/DataPoints/DataPoints/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataPoints/DataPoints/labels{/name}","releases_url":"https://api.github.com/repos/DataPoints/DataPoints/releases{/id}","created_at":"2014-10-14T22:27:04Z","updated_at":"2014-12-11T07:55:31Z","pushed_at":"2015-03-07T21:17:59Z","git_url":"git://github.com/DataPoints/DataPoints.git","ssh_url":"git@github.com:DataPoints/DataPoints.git","clone_url":"https://github.com/DataPoints/DataPoints.git","svn_url":"https://github.com/DataPoints/DataPoints","homepage":"","size":3204,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"DataPoints:dev","ref":"dev","sha":"ee3edeff1f90262e1f61d1a74151d174ca446a81","user":{"login":"DataPoints","id":9219979,"avatar_url":"https://avatars.githubusercontent.com/u/9219979?v=3","gravatar_id":"","url":"https://api.github.com/users/DataPoints","html_url":"https://github.com/DataPoints","followers_url":"https://api.github.com/users/DataPoints/followers","following_url":"https://api.github.com/users/DataPoints/following{/other_user}","gists_url":"https://api.github.com/users/DataPoints/gists{/gist_id}","starred_url":"https://api.github.com/users/DataPoints/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataPoints/subscriptions","organizations_url":"https://api.github.com/users/DataPoints/orgs","repos_url":"https://api.github.com/users/DataPoints/repos","events_url":"https://api.github.com/users/DataPoints/events{/privacy}","received_events_url":"https://api.github.com/users/DataPoints/received_events","type":"Organization","site_admin":false},"repo":{"id":25229255,"name":"DataPoints","full_name":"DataPoints/DataPoints","owner":{"login":"DataPoints","id":9219979,"avatar_url":"https://avatars.githubusercontent.com/u/9219979?v=3","gravatar_id":"","url":"https://api.github.com/users/DataPoints","html_url":"https://github.com/DataPoints","followers_url":"https://api.github.com/users/DataPoints/followers","following_url":"https://api.github.com/users/DataPoints/following{/other_user}","gists_url":"https://api.github.com/users/DataPoints/gists{/gist_id}","starred_url":"https://api.github.com/users/DataPoints/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataPoints/subscriptions","organizations_url":"https://api.github.com/users/DataPoints/orgs","repos_url":"https://api.github.com/users/DataPoints/repos","events_url":"https://api.github.com/users/DataPoints/events{/privacy}","received_events_url":"https://api.github.com/users/DataPoints/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DataPoints/DataPoints","description":"DataPoints","fork":false,"url":"https://api.github.com/repos/DataPoints/DataPoints","forks_url":"https://api.github.com/repos/DataPoints/DataPoints/forks","keys_url":"https://api.github.com/repos/DataPoints/DataPoints/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataPoints/DataPoints/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataPoints/DataPoints/teams","hooks_url":"https://api.github.com/repos/DataPoints/DataPoints/hooks","issue_events_url":"https://api.github.com/repos/DataPoints/DataPoints/issues/events{/number}","events_url":"https://api.github.com/repos/DataPoints/DataPoints/events","assignees_url":"https://api.github.com/repos/DataPoints/DataPoints/assignees{/user}","branches_url":"https://api.github.com/repos/DataPoints/DataPoints/branches{/branch}","tags_url":"https://api.github.com/repos/DataPoints/DataPoints/tags","blobs_url":"https://api.github.com/repos/DataPoints/DataPoints/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataPoints/DataPoints/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataPoints/DataPoints/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataPoints/DataPoints/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataPoints/DataPoints/statuses/{sha}","languages_url":"https://api.github.com/repos/DataPoints/DataPoints/languages","stargazers_url":"https://api.github.com/repos/DataPoints/DataPoints/stargazers","contributors_url":"https://api.github.com/repos/DataPoints/DataPoints/contributors","subscribers_url":"https://api.github.com/repos/DataPoints/DataPoints/subscribers","subscription_url":"https://api.github.com/repos/DataPoints/DataPoints/subscription","commits_url":"https://api.github.com/repos/DataPoints/DataPoints/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataPoints/DataPoints/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataPoints/DataPoints/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataPoints/DataPoints/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataPoints/DataPoints/contents/{+path}","compare_url":"https://api.github.com/repos/DataPoints/DataPoints/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataPoints/DataPoints/merges","archive_url":"https://api.github.com/repos/DataPoints/DataPoints/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataPoints/DataPoints/downloads","issues_url":"https://api.github.com/repos/DataPoints/DataPoints/issues{/number}","pulls_url":"https://api.github.com/repos/DataPoints/DataPoints/pulls{/number}","milestones_url":"https://api.github.com/repos/DataPoints/DataPoints/milestones{/number}","notifications_url":"https://api.github.com/repos/DataPoints/DataPoints/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataPoints/DataPoints/labels{/name}","releases_url":"https://api.github.com/repos/DataPoints/DataPoints/releases{/id}","created_at":"2014-10-14T22:27:04Z","updated_at":"2014-12-11T07:55:31Z","pushed_at":"2015-03-07T21:17:59Z","git_url":"git://github.com/DataPoints/DataPoints.git","ssh_url":"git@github.com:DataPoints/DataPoints.git","clone_url":"https://github.com/DataPoints/DataPoints.git","svn_url":"https://github.com/DataPoints/DataPoints","homepage":"","size":3204,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DataPoints/DataPoints/pulls/38"},"html":{"href":"https://github.com/DataPoints/DataPoints/pull/38"},"issue":{"href":"https://api.github.com/repos/DataPoints/DataPoints/issues/38"},"comments":{"href":"https://api.github.com/repos/DataPoints/DataPoints/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/DataPoints/DataPoints/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/DataPoints/DataPoints/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DataPoints/DataPoints/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/DataPoints/DataPoints/statuses/b051f85930933b85c73458deb225282536c7f013"}}}}