User Tools

Site Tools


r:input_output

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
r:input_output [2018/11/16 09:22] – [Fixed-Width Records] hkimscilr:input_output [2019/09/19 12:28] – [Fixed-Width Records] hkimscil
Line 72: Line 72:
 </code> </code>
  
-<code>> records <- read.fwf("fixed-width.txt", widths=c(10,10,4,-1,4))+<code>> records <- read.fwf("http://commres.net/wiki/_export/code/r/input_output?codeblock=11", widths=c(10,10,4,-1,4))
 </code> </code>
  
Line 87: Line 87:
 Funky variable names (V1, V2, . . .). Use the below method with "col.names=c()" option. Funky variable names (V1, V2, . . .). Use the below method with "col.names=c()" option.
  
-<code>> records <- read.fwf("fixed-width.txt", widths=c(10,10,4,-1,4),+<code>> records <- read.fwf("http://commres.net/wiki/_export/code/r/input_output?codeblock=11", widths=c(10,10,4,-1,4),
 +                     col.names=c("Last","First","Born","Died")) +                     col.names=c("Last","First","Born","Died"))
 > records > records
r/input_output.txt · Last modified: 2019/09/20 10:32 by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki