{"id":24605842,"url":"https://github.com/r0f1/rhelp","last_synced_at":"2025-03-18T10:21:56.979Z","repository":{"id":116256214,"uuid":"69598986","full_name":"r0f1/rhelp","owner":"r0f1","description":null,"archived":false,"fork":false,"pushed_at":"2017-09-12T08:05:10.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-24T16:38:13.891Z","etag":null,"topics":["biostatistics","datascience","r","statistics","sweave"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/r0f1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-29T19:06:47.000Z","updated_at":"2016-09-29T19:06:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"768d2ae0-0733-4d2a-95f7-9eb45dd75dfc","html_url":"https://github.com/r0f1/rhelp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r0f1%2Frhelp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r0f1%2Frhelp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r0f1%2Frhelp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r0f1%2Frhelp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r0f1","download_url":"https://codeload.github.com/r0f1/rhelp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244198358,"owners_count":20414445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["biostatistics","datascience","r","statistics","sweave"],"created_at":"2025-01-24T16:31:58.604Z","updated_at":"2025-03-18T10:21:56.968Z","avatar_url":"https://github.com/r0f1.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# R help\n\n## Exploratory data analysis\n\n### Finding out n, distribution\n\n    library(psych)\n    cols \u003c- c(\"n\", \"mean\", \"median\", \"min\", \"max\", \"sd\")\n    desc \u003c- data.frame(describe(dt))[cols]\n\nMore info see [here](http://www.statmethods.net/stats/descriptives.html) and [here](http://www.ats.ucla.edu/stat/r/faq/collapse.htm).\n\n\n## Reliably importing packages\n\n    packages \u003c- c(\"xtable\", \"stats\", \"plyr\", \"dplyr\", \"ggplot2\", \"RColorBrewer\")\n    \n    for(i in 1:length(packages)) {\n    \tpkg \u003c- packages[i]\n    \tif (!require(pkg, character.only=TRUE)) {\n    \t\tinstall.packages(pkg, repos=\"http://cran.rstudio.com/\")\n    \t\tlibrary(pkg, character.only=TRUE)\n    \t}\n    }\n\n\n## Misc\n\n### Likelihood ratio test\n\n    # Likelihood of both models, degrees of freedom\n    # https://onlinecourses.science.psu.edu/stat504/node/220\n    p_interaction \u003c- function(lik1, lik2, df){\n      d = abs(lik1-lik2);\n      return (dchisq(d, df));\n    }\n    p_interaction(5521.201, 5504.008, 8);\n   \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr0f1%2Frhelp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr0f1%2Frhelp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr0f1%2Frhelp/lists"}