Note that there are some explanatory texts on larger screens.

plurals
  1. POBasic JSON file management in R
    text
    copied!<p><strong>Background</strong></p> <p>I got a really nice dataset regrding ALS that I need to access so I can test some very interesting methods of machine learning. The problem is that the dataset is very poorly supported and I lack experience when it comes working with complex datastructures or JSON in R</p> <p><strong>What I need</strong></p> <p>If someone can help prividing me with actual R code examples (preferable using RJSON or rjsonio) on how I should access the code it would be great. Any basic tutorials/descriptions on how to use JSON with R would also be appreciated as JSON.org is more tailored to people with programming experience using it for programming AJAX/SQL applications.</p> <p>Data to show my specific problem (dictionary file and data in the text file) I couldn't post text from the dictionary file so here is a screenshot for it posted on Flrickr <a href="http://flic.kr/p/cSNbpm" rel="nofollow">http://flic.kr/p/cSNbpm</a></p> <p>The actual data is several thousands of lines long but looks like this:</p> <pre><code>649|144|Demographics|5AC60165-78AA-4E1D-8CCF-F1A21B944A8B|1203|Demographics Delta|0 649|144|Demographics|5AC60165-78AA-4E1D-8CCF-F1A21B944A8B|1204|Ethnicity| 649|144|Demographics|5AC60165-78AA-4E1D-8CCF-F1A21B944A8B|1207|Race - Asian| 649|144|Demographics|5AC60165-78AA-4E1D-8CCF-F1A21B944A8B|1208|Race - Black/African American| 649|144|Demographics|5AC60165-78AA-4E1D-8CCF-F1A21B944A8B|1211|Race - Caucasian|1 649|144|Demographics|5AC60165-78AA-4E1D-8CCF-F1A21B944A8B|1257|Age|48 649|144|Demographics|5AC60165-78AA-4E1D-8CCF-F1A21B944A8B|1393|Race - Other| 649|145|ALSFRS(R)|B2F1F8AC-6BEA-483C-9BC8-F13C51ED6FFB|1213|1. Speech|3 649|145|ALSFRS(R)|B2F1F8AC-6BEA-483C-9BC8-F13C51ED6FFB|1214|10. Respiratory|4 649|145|ALSFRS(R)|B2F1F8AC-6BEA-483C-9BC8-F13C51ED6FFB|1215|2. Salivation|3 649|145|ALSFRS(R)|B2F1F8AC-6BEA-483C-9BC8-F13C51ED6FFB|1216|3. Swallowing|2 649|145|ALSFRS(R)|B2F1F8AC-6BEA-483C-9BC8-F13C51ED6FFB|1217|4. Handwriting|4 649|145|ALSFRS(R)|B2F1F8AC-6BEA-483C-9BC8-F13C51ED6FFB|1218|5a. Cutting without Gastrostomy|4 </code></pre> <p>It seems to be separated into several different section so further down the general structure is changed several times</p> <pre><code>727029|146|Laboratory Data|67962337-62FA-42E3-9E22-1C36965088D6|1234|Laboratory Delta|448 727029|146|Laboratory Data|67962337-62FA-42E3-9E22-1C36965088D6|1250|Test Name|Urea 727029|146|Laboratory Data|67962337-62FA-42E3-9E22-1C36965088D6|1251|Test Result|4.50 727029|146|Laboratory Data|67962337-62FA-42E3-9E22-1C36965088D6|1252|Test Unit|mmol/L 727029|146|Laboratory Data|C2F387B2-00B5-4645-9B2A-03F43117C44B|1234|Laboratory Delta|448 </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload