dataframe - Getting list from row R -


i have file, when u can check here: http://www.nbp.pl/kursy/archiwum/archiwum_tab_a_1999.xls

i want first row of file list. when this:

dane <- read.xls("http://www.nbp.pl/kursy/archiwum/archiwum_tab_a_1999.xls") names(dane) 

i recieved list weird values x1, x2. want list of elements: nr / no. data / date 1 usd 1 eur 1 aud etc.

edit:

result of dput(dane):

http://pastebin.com/5yzwmx6a 

edit 2:

result of names(dane):

[1] "x"                               "x.1"                             [3] "w.a.l.u.t.a.....c.u.r.r.e.n.c.y" "x.2"                             [5] "x.3"                             "x.4"                             [7] "x.5"                             "x.6"                             [9] "x.7"                             "x.8"                             [11] "x.9"                             "x.10"                            [13] "x.11"                            "x.12"                            [15] "x.13"                            "x.14"                            [17] "x.15"                            "x.16"                            [19] "x.17"                            "x.18"                            [21] "x.19"                            "x.20"                            [23] "x.21"                            "x.22"     

the problem have first row bunch of merged cells. should try edited version deletes first row.enter image description here

it wasn't clear me read.xls honor request skip lines does, succeeds:

> input <- gdata::read.xls("~/downloads/archiwum_tab_a_1999.xls", skip=1) > str(input) 'data.frame':   254 obs. of  28 variables:  $ nr...no.   : int  1 2 3 4 5 6 7 8 9 10 ...  $ data...date: factor w/ 254 levels "1999-01-01","1999-01-04",..: 1 2 3 4 5 6 7 8 9 10 ...  $ x1.usd     : num  3.5 3.45 3.41 3.41 3.46 ...  $ x1.eur     : num  4.09 4.07 4.02 4.01 4.02 ...  $ x1.aud     : num  2.15 2.13 2.12 2.13 2.17 ...  $ x1.ats     : num  0.297 0.296 0.292 0.291 0.292 ...  $ x100.bef   : num  10.14 10.08 9.98 9.94 9.96 ...  $ x1.czk     : num  0.117 0.116 0.115 0.115 0.115 ...  $ x1.dkk     : num  0.548 0.546 0.54 0.538 0.54 ...  $ x1.fim     : num  0.688 0.684 0.677 0.674 0.676 ...  $ x1.frf     : num  0.624 0.62 0.614 0.611 0.613 ...  $ x100.grd   : num  1.25 1.25 1.24 1.23 1.24 ...  $ x100.esp   : num  2.46 2.44 2.42 2.41 2.42 ...  $ x1.nlg     : num  1.86 1.85 1.83 1.82 1.82 ...  $ x1.iep     : num  5.2 5.16 5.11 5.09 5.1 ...  $ x100.jpy   : num  3.09 3.04 3.06 3.05 3.11 ...  $ x1.cad     : num  2.29 2.26 2.24 2.26 2.28 ...  $ x100.luf   : num  10.14 10.08 9.98 9.94 9.96 ...  $ x1.nok     : num  0.461 0.459 0.458 0.459 0.466 ...  $ x100.pte   : num  2.04 2.03 2.01 2 2 ...  $ x1.dem     : num  2.09 2.08 2.06 2.05 2.06 ...  $ x1.chf     : num  2.55 2.52 2.49 2.49 2.49 ...  $ x1.sek     : num  0.431 0.429 0.428 0.431 0.438 ...  $ x100.huf   : num  1.62 1.62 1.6 1.6 1.61 ...  $ x1.gbp     : num  5.76 5.72 5.65 5.67 5.7 ...  $ x100.itl   : num  0.211 0.21 0.208 0.207 0.208 ...  $ x1.xdr     : num  4.93 4.86 4.81 4.83 4.84 ...  $ x          : logi  na na na na na na ... 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -