saa
January 9, 2019, 1:02am
1
Hello, I'm having problems importing CSV files into R Studio using "Import Dataset" "From Text (readr)..." in the "Environment" window. Column headers are correct, but no data appears under column headers. Instead, "No data available in table" appears under column headers (see attached).
Import was working fine, but I recently updated several packages (didn't record package names) and import of CSV files using "From Text (readr)..." no longer works. I've tried reinstalling R and R Studio, down-grading readr, but to no avail. I'm absolutely stumped as a newbie. Any help would be appreciated, thanks. Steve
1 Like
cderv
January 9, 2019, 7:12am
2
Without knowing what is inside Homo_1.csv
, it will be difficult to help.
Can you share the file or just a few lines ?
That way will know what the file look like and see what options of read_csv
could be activated.
saa
January 9, 2019, 8:15am
3
As requested, I've enclosed a copy of Homo_1.csv
Genus_Species
Age_Ma
Cranial_Capacity_cc
Sahelanthropus tchadensis
6.5
365
Ardipithecus ramidus
4.4
325
Kenyanthropus platyops
3.5
425
Australopithecus afarensis
3.18
400
Australopithecus afarensis
3
387
Australopithecus afarensis
3.18
400
Australopithecus afarensis
3.18
485
Australopithecus afarensis
3
550
Australopithecus afarensis
3.35
300
Paranthropus aethiopicus
2.5
400
Paranthropus boisei
1.5
500
Paranthropus boisei
1.85
510
Paranthropus boisei
1.7
500
Paranthropus boisei
1.7
475
Paranthropus boisei
1.4
545
Paranthropus boisei
1.8
520
Paranthropus robustus
1.65
800
Paranthropus robustus
1.5
500
Paranthropus robustus
1.5
450
Paranthropus robustus
1.5
530
Australopithecus africanus
3.1
510
Australopithecus africanus
3.1
425
Australopithecus africanus
2.5
485
Australopithecus africanus
2.5
436
Australopithecus africanus
2.5
400
Australopithecus africanus
2.5
428
Australopithecus africanus
2.6
505
Australopithecus africanus
3.67
408
Australopithecus africanus
2.6
440
Australopithecus africanus
2.5
457
Australopithecus sediba
1.865
420
Australopithecus garbi
2.5
450
Homo naledi
0.25
560
Homo naledi
0.25
465
Homo naledi
0.25
610
Homo habilis
1.85
582
Homo habilis
1.88
509
Homo habilis
1.8
729
Homo habilis
1.5
650
Homo habilis
1.7
638
Homo habilis
1.8
590
Homo rudolfensis
1.88
750
Homo rudolfensis
1.88
752
Homo rudolfensis
1.85
825
Homo georgicus
1.7
730
Homo georgicus
1.7
650
Homo georgicus
1.7
601
Homo georgicus
1.8
546
Homo erectus
0.89
775
Homo erectus
1
995
Homo erectus
0.412
1025
Homo erectus
1.55
691
Homo erectus
1.5
900
Homo erectus
0.7
780
Homo erectus
0.6
876
Homo erectus
0.236
1260
Homo erectus
0.99
727
Homo erectus
1.4
1067
Homo erectus
0.24
880
Homo erectus
0.8
1035
Homo erectus
0.4
1006
Homo erectus
0.8
813
Homo erectus
1.5
813
Homo erectus
1
950
Homo erectus
1.6
908
Homo erectus
1.2
855
Homo erectus
1.1
1059
Homo erectus
1.3
1004
Homo erectus
1.25
845
Homo erectus
0.9
940
Homo erectus
0.4
1200
Homo erectus
0.58
915
Homo erectus
0.42
1225
Homo erectus
0.42
1015
Homo erectus
0.42
1030
Homo erectus
0.3
1140
Homo erectus
0.345
1172
Homo erectus
0.345
1251
Homo erectus
0.345
1013
Homo erectus
0.345
1135
Homo erectus
0.345
1231
Homo erectus
0.345
1090
Homo erectus
1.7
625
Homo erectus
1.7
546
Homo ergaster
1.78
848
Homo ergaster
1.57
804
Homo antecessor
0.565
1390
Homo antecessor
0.565
1125
Homo antecessor
0.565
1140
Homo heidelbergensis
0.4
1166
Homo heidelbergensis
0.175
1200
Homo heidelbergensis
0.6
1250
Homo heidelbergensis
0.8
1165
Homo heidelbergensis
0.209
1120
Homo heidelbergensis
0.23
1450
Homo heidelbergensis
0.28
1390
Homo heidelbergensis
0.18
1325
Homo heidelbergensis
0.13
1250
Homo heidelbergensis
0.4
1100
Homo heidelbergensis
0.21
1230
Homo heidelbergensis
0.2
1430
Homo heidelbergensis
0.5
1225
Homo heidelbergensis
0.4
880
Homo heidelbergensis
0.225
1200
Homo heidelbergensis
0.25
1325
Homo neanderthalensis
0.041
1740
Homo neanderthalensis
0.05
1096
Homo neanderthalensis
0.05
1089
Homo neanderthalensis
0.06
1362
Homo neanderthalensis
0.04
1525
Homo neanderthalensis
0.09
1320
Homo neanderthalensis
0.05
1400
Homo neanderthalensis
0.05
1200
Homo neanderthalensis
0.1
1305
Homo neanderthalensis
0.1
1400
Homo neanderthalensis
0.13
1255
Homo neanderthalensis
0.13
1205
Homo neanderthalensis
0.13
1450
Homo neanderthalensis
0.05
1625
Homo neanderthalensis
0.068
1640
Homo neanderthalensis
0.06
1200
Homo neanderthalensis
0.065
1172
Homo neanderthalensis
0.041
1565
Homo neanderthalensis
0.052
1360
Homo neanderthalensis
0.04
1525
Homo neanderthalensis
0.103
1150
Homo neanderthalensis
0.05
1260
Homo neanderthalensis
0.125
1245
Homo neanderthalensis
0.125
1300
Homo neanderthalensis
0.06
1600
Homo neanderthalensis
0.06
1550
Homo neanderthalensis
0.1
1450
Homo neanderthalensis
0.1
1554
Homo neanderthalensis
0.1
1520
Homo neanderthalensis
0.1
1590
Homo neanderthalensis
0.068
1305
Homo neanderthalensis
0.068
1553
Homo neanderthalensis
0.075
1271
Homo neanderthalensis
0.07
1525
Homo floresiensis
0.018
417
Homo sapiens (archaic)
0.16
1450
Homo sapiens (archaic)
0.25
1300
Homo sapiens (archaic)
0.07
1510
Homo sapiens (archaic)
0.12
1367
Homo sapiens (archaic)
0.09
1568
Homo sapiens (archaic)
0.09
1531
Homo sapiens (archaic)
0.133
1550
Homo sapiens (archaic)
0.13
1390
Homo sapiens
0.022
1380
Homo sapiens
0.023
1414
Homo sapiens
0.023
1424
Homo sapiens
0.023
1520
Homo sapiens
0.023
1661
Homo sapiens
0.026
1600
Homo sapiens
0.026
1500
Homo sapiens
0.026
1304
Homo sapiens
0.019
1555
Homo sapiens
0.014
1434
Homo sapiens
0.012
1530
Homo sapiens
0.028
1570
Homo sapiens
0.012
1444
Homo sapiens
0.03
1730
Homo sapiens
0.03
1590
Homo sapiens
0.028
1285
Homo sapiens
0.028
1538
Homo sapiens
0.028
1481
Homo sapiens
0.028
1547
Homo sapiens
0.028
1378
Homo sapiens
0.028
1775
Homo sapiens
0.028
1375
Homo sapiens
0.028
1580
Homo sapiens
0.012
1497
Homo sapiens
0.036
1222
Homo sapiens
0.02
1605
Homo sapiens
0.04
1480
Homo sapiens
0.018
1390
Homo sapiens
0.018
1170
Homo sapiens
0.018
1090
Homo sapiens
0.03
1540
Homo sapiens
0.03
1390
Homo sapiens
0.03
1650
Homo sapiens
0.037
1420
Homo sapiens
0.012
1500
Homo sapiens
0.012
1370
Homo sapiens
0.12
1435
Homo sapiens
0.026
1472
Homo sapiens
0.026
1580
Homo sapiens
0.026
1250
Homo sapiens
0.026
1555
Homo sapiens
0.026
1452
Homo sapiens
0.011
1565
Homo sapiens
0.011
1569
Homo sapiens
0.011
1560
Homo sapiens
0.011
1484
Homo sapiens
0.011
1500
Homo sapiens
0.015
1354
Homo sapiens
0.024
1464
Homo sapiens
0.024
1267
Homo sapiens
0.024
1361
Homo sapiens
0.024
1453
Homo sapiens
0.01
1430
Homo sapiens
0.015
1539
Homo sapiens
0.015
1650
Homo sapiens
0.015
1540
Homo sapiens
0.015
1500
Homo sapiens
0.015
1380
Homo sapiens
0.015
1290
1 Like
jvent
January 9, 2019, 4:04pm
4
I’ve noticed that this occurs for me when I try import a dodgy csv file or a weird character seems to be in the file.
Check encoding of both the file type when you make the csv and also make sure readr is using same encoding.
Another thing you could do is go into the file explorer window of Rstudio, click the file, and then select the import dataset button. It will then open the file in the Rstudio source editor and for me at least the troublesome characters were highlighted, making it easy to just delete them and reload with readr.
IMO file/date encoding issues are my most despised ‘feature’ or R
Hmm, it's hard to tell because of the way your file has been formatted when you copy/pasted it onto the forum, but in the screenshot you've got the delimiter as comma
but might the dataset be tab delimited?
saa
January 9, 2019, 9:54pm
6
Just to clarify, Homo_1.csv is one of over 50 CSV files that I imported into RStudio using "From Text (readr)..." without any issues. It was only after updating several packages (didn't record package names) that problems began. I don't believe the problem has anything to do with how the CSV files are formatted, but rather what happened to RStudio upon upgrading packages. I'll try reinstalling RStudio to see if this makes a difference. Thanks, Steve
1 Like
system
Closed
January 30, 2019, 9:54pm
7
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.