{"id":61,"date":"2015-04-28T12:08:04","date_gmt":"2015-04-28T11:08:04","guid":{"rendered":"http:\/\/pcool.dyndns.org:8080\/statsbook\/?page_id=61"},"modified":"2025-06-23T22:57:43","modified_gmt":"2025-06-23T21:57:43","slug":"data-into-r","status":"publish","type":"page","link":"https:\/\/pcool.dyndns.org\/index.php\/data-into-r\/","title":{"rendered":"Data into R"},"content":{"rendered":"\n<p>There are three options to get data into R:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/pcool.dyndns.org\/index.php\/data-into-r\/enter-manually\/\" data-type=\"page\" data-id=\"63\">Enter manually<\/a> (for small data sets)<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"http:\/\/pcool.dyndns.org:8080\/statsbook\/?page_id=67\">Import <\/a><a href=\"https:\/\/pcool.dyndns.org\/index.php\/data-into-r\/import-spreadsheet\/\" data-type=\"page\" data-id=\"67\">spreadsheet<\/a> (CSV, or Excel files)<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/pcool.dyndns.org\/index.php\/data-into-r\/open-from-console\/\" data-type=\"page\" data-id=\"69\">Open RDA files<\/a> (R data files; for data already processed in R)<\/li>\n<\/ul>\n\n\n\n<p>It is best to have <strong>no spaces<\/strong> in variable names as otherwise the whole name . In a spreadsheet, the variable names are stored in the first row. If the variable name contains a space, this space will be converted to a full stop &#8220;.&#8221;.&nbsp; However, it is generally preferable not to use spaces in variable names and adhere to <a href=\"https:\/\/en.wikipedia.org\/wiki\/Naming_convention_(programming)\">conventions<\/a> such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Camel_case\" data-type=\"link\" data-id=\"https:\/\/en.wikipedia.org\/wiki\/Camel_case\" target=\"_blank\" rel=\"noreferrer noopener\">camelCase <\/a><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Camel_case\" target=\"_blank\" rel=\"noreferrer noopener\">PascalCase<\/a><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Snake_case\" target=\"_blank\" rel=\"noreferrer noopener\">snake_case<\/a><\/li>\n<\/ul>\n\n\n\n<p>See also:<\/p>\n\n\n\n<p><a href=\"https:\/\/pcool.dyndns.org\/index.php\/cleaning-data-in-r\/\" data-type=\"page\" data-id=\"1790\">Importing and Cleaning Data in R<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are three options to get data into R: It is best to have no spaces in variable names as otherwise the whole name . In a spreadsheet, the variable names are stored in the first row. If the variable name contains a space, this space will be converted to a full stop &#8220;.&#8221;.&nbsp; However, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"footnotes":""},"class_list":["post-61","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages\/61","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/comments?post=61"}],"version-history":[{"count":4,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages\/61\/revisions"}],"predecessor-version":[{"id":4327,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages\/61\/revisions\/4327"}],"wp:attachment":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/media?parent=61"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}