Importing Dataset with readxl,readr,read_csv

I am trying to import a large data set into R studio. The file is missing part of the dates on the first row when I import and I am getting an error of file too large. The file 'SingleFamilyResidence'.csv is too large to open in the source editor(the file is 22.1 MB and the maximum file size is 5 MB).

My data set is formatted like below:

RegionID RegionName State Metro CountyName SizeRank Columns of dates(96 of them by month year). 2010-11 to 2018-10(all years/months).

I can see 30 of the headers by month year in R studio but the rest of the columns have no date in R. This is for my final project in my first R programming course.

Can you please help me to figure out what is going wrong with this data import? I have not encountered this issue in my prior class experience.

Thanks,
Lori

Hi Lori,

Looking at the error you're getting, my guess is that you're using the View File function of the Files tab to attempt to view the .csv file.

Using the Import Dataset.. function, works on my computer, and should result in a dataframe named SingleFamilyResidence for you. You can then select it from your Global Environment to view the data (50 columns at a time).

Pete,

So you can only work with 50 columns at the time. I just posted another question after I had looked at the dataset. It has 444 rows and 102 columns of data. Do you know why I am losing column headings after column HR? Do I need to split the data by month year since it covers a 26 year period?

See below for new post from tonight:

Thanks for your help. Lori

My R code:

library(tidyverse)
dim(SingleFamilyResidenceRental)
lapply(SingleFamilyResidenceRental, class)
str(SingleFamilyResidenceRental)
SingleFamilyResidenceRental <- read_csv("SingleFamilyResidenceRental.csv")
SingleFamilyResidenceSales <- read_csv("SingleFamilyResidenceSales.csv")
information on the dataset:
[1] 444 102
$RegionID
[1] "numeric"

$RegionName
[1] "character"

$State
[1] "character"

$Metro
[1] "character"

$CountyName
[1] "character"

$SizeRank
[1] "numeric"

$2010-11
[1] "numeric"

$2010-12
[1] "numeric"

$2011-01
[1] "numeric"

$2011-02
[1] "numeric"

$2011-03
[1] "numeric"

$2011-04
[1] "numeric"

$2011-05
[1] "numeric"

$2011-06
[1] "numeric"

$2011-07
[1] "numeric"

$2011-08
[1] "numeric"

$2011-09
[1] "numeric"

$2011-10
[1] "numeric"

$2011-11
[1] "numeric"

$2011-12
[1] "numeric"

$2012-01
[1] "numeric"

$2012-02
[1] "numeric"

$2012-03
[1] "numeric"

$2012-04
[1] "numeric"

$2012-05
[1] "numeric"

$2012-06
[1] "numeric"

$2012-07
[1] "numeric"

$2012-08
[1] "numeric"

$2012-09
[1] "numeric"

$2012-10
[1] "numeric"

$2012-11
[1] "numeric"

$2012-12
[1] "numeric"

$2013-01
[1] "numeric"

$2013-02
[1] "numeric"

$2013-03
[1] "numeric"

$2013-04
[1] "numeric"

$2013-05
[1] "numeric"

$2013-06
[1] "numeric"

$2013-07
[1] "numeric"

$2013-08
[1] "numeric"

$2013-09
[1] "numeric"

$2013-10
[1] "numeric"

$2013-11
[1] "numeric"

$2013-12
[1] "numeric"

$2014-01
[1] "numeric"

$2014-02
[1] "numeric"

$2014-03
[1] "numeric"

$2014-04
[1] "numeric"

$2014-05
[1] "numeric"

$2014-06
[1] "numeric"

$2014-07
[1] "numeric"

$2014-08
[1] "numeric"

$2014-09
[1] "numeric"

$2014-10
[1] "numeric"

$2014-11
[1] "numeric"

$2014-12
[1] "numeric"

$2015-01
[1] "numeric"

$2015-02
[1] "numeric"

$2015-03
[1] "numeric"

$2015-04
[1] "numeric"

$2015-05
[1] "numeric"

$2015-06
[1] "numeric"

$2015-07
[1] "numeric"

$2015-08
[1] "numeric"

$2015-09
[1] "numeric"

$2015-10
[1] "numeric"

$2015-11
[1] "numeric"

$2015-12
[1] "numeric"

$2016-01
[1] "numeric"

$2016-02
[1] "numeric"

$2016-03
[1] "numeric"

$2016-04
[1] "numeric"

$2016-05
[1] "numeric"

$2016-06
[1] "numeric"

$2016-07
[1] "numeric"

$2016-08
[1] "numeric"

$2016-09
[1] "numeric"

$2016-10
[1] "numeric"

$2016-11
[1] "numeric"

$2016-12
[1] "numeric"

$2017-01
[1] "numeric"

$2017-02
[1] "numeric"

$2017-03
[1] "numeric"

$2017-04
[1] "numeric"

$2017-05
[1] "numeric"

$2017-06
[1] "numeric"

$2017-07
[1] "numeric"

$2017-08
[1] "numeric"

$2017-09
[1] "numeric"

$2017-10
[1] "numeric"

$2017-11
[1] "numeric"

$2017-12
[1] "numeric"

$2018-01
[1] "numeric"

$2018-02
[1] "numeric"

$2018-03
[1] "numeric"

$2018-04
[1] "numeric"

$2018-05
[1] "numeric"

$2018-06
[1] "numeric"

$2018-07
[1] "numeric"

$2018-08
[1] "numeric"

$2018-09
[1] "numeric"

$2018-10
[1] "numeric"

Classes ‘spec_tbl_df’, ‘tbl_df’, ‘tbl’ and 'data.frame': 444 obs. of 102 variables:
R
e
g
i
o
n
I
D
:
n
u
m
24043
54047
11722
24457
41760
.
.
.
RegionName: chr "Charlotte" "Raleigh" "Greensboro" "Durham" ...
S
t
a
t
e
:
c
h
r
"
N
C
""
N
C
""
N
C
""
N
C
"
.
.
.
Metro : chr "Charlotte-Concord-Gastonia" "Raleigh" "Greensboro-High Point" "Durham-Chapel Hill" ...
C
o
u
n
t
y
N
a
m
e
:
c
h
r
"
M
e
c
k
l
e
n
b
u
r
g
C
o
u
n
t
y
""
W
a
k
e
C
o
u
n
t
y
""
G
u
i
l
f
o
r
d
C
o
u
n
t
y
""
D
u
r
h
a
m
C
o
u
n
t
y
"
.
.
.
SizeRank : num 16 38 70 75 95 101 141 217 306 342 ...
2010

11
:
n
u
m
1080
1198
912
1185
918
.
.
.
2010-12 : num 1070 1202 919 1177 932 ...
2011

01
:
n
u
m
1067
1204
938
1173
933
.
.
.
2011-02 : num 1066 1205 950 1169 923 ...
2011

03
:
n
u
m
1068
1205
971
1169
912
.
.
.
2011-04 : num 1071 1206 981 1173 907 ...
2011

05
:
n
u
m
1076
1207
985
1178
907
.
.
.
2011-06 : num 1082 1210 982 1179 914 ...
2011

07
:
n
u
m
1090
1214
979
1176
923
.
.
.
2011-08 : num 1099 1220 979 1172 933 ...
2011

09
:
n
u
m
1109
1227
985
1168
936
.
.
.
2011-10 : num 1114 1236 989 1162 936 ...
2011

11
:
n
u
m
1113
1243
989
1157
934
.
.
.
2011-12 : num 1109 1245 985 1152 932 ...
2012

01
:
n
u
m
1106
1247
984
1152
934
.
.
.
2012-02 : num 1106 1247 979 1153 940 ...
2012

03
:
n
u
m
1109
1249
969
1153
949
.
.
.
2012-04 : num 1115 1246 956 1155 958 ...
2012

05
:
n
u
m
1123
1244
945
1162
963
.
.
.
2012-06 : num 1133 1246 940 1171 970 ...
2012

07
:
n
u
m
1143
1255
940
1179
975
.
.
.
2012-08 : num 1152 1266 938 1182 981 ...
2012

09
:
n
u
m
1156
1272
935
1180
980
.
.
.
2012-10 : num 1158 1271 927 1180 977 ...
2012

11
:
n
u
m
1157
1263
924
1182
971
.
.
.
2012-12 : num 1154 1254 916 1185 965 ...
2013

01
:
n
u
m
1152
1247
914
1187
960
.
.
.
2013-02 : num 1151 1245 913 1189 955 ...
2013

03
:
n
u
m
1154
1244
918
1192
951
.
.
.
2013-04 : num 1159 1247 921 1195 948 ...
2013

05
:
n
u
m
1166
1255
928
1202
950
.
.
.
2013-06 : num 1172 1268 937 1209 960 ...
2013

07
:
n
u
m
1179
1282
951
1217
976
.
.
.
2013-08 : num 1185 1292 964 1218 990 ...
2013

09
:
n
u
m
1190
1297
974
1219
999
.
.
.
2013-10 : num 1194 1297 979 1216 1002 ...
2013

11
:
n
u
m
1196
1295
984
1213
1003
.
.
.
2013-12 : num 1197 1293 988 1207 1001 ...
2014

01
:
n
u
m
1194
1291
989
1204
998
.
.
.
2014-02 : num 1190 1290 986 1204 997 ...
2014

03
:
n
u
m
1186
1290
981
1204
995
.
.
.
2014-04 : num 1184 1292 977 1208 994 ...
2014

05
:
n
u
m
1185
1296
976
1214
994
.
.
.
2014-06 : num 1187 1300 976 1223 993 ...
2014

07
:
n
u
m
1192
1311
978
1234
992
.
.
.
2014-08 : num 1202 1322 981 1243 991 ...
2014

09
:
n
u
m
1214
1332
983
1250
989
.
.
.
2014-10 : num 1224 1335 985 1252 989 ...
2014

11
:
n
u
m
1231
1337
987
1253
988
.
.
.
2014-12 : num 1235 1339 993 1257 988 ...
2015

01
:
n
u
m
1237
1341
997
1262
989
.
.
.
2015-02 : num 1236 1346 999 1268 989 ...
2015

03
:
n
u
m
1237
1350
996
1271
988
.
.
.
2015-04 : num 1240 1355 1002 1275 984 ...
2015

05
:
n
u
m
1245
1358
1016
1278
982
.
.
.
2015-06 : num 1253 1362 1033 1284 989 ...
2015

07
:
n
u
m
1263
1369
1044
1292
1000
.
.
.
2015-08 : num 1272 1376 1047 1299 1013 ...
2015

09
:
n
u
m
1276
1382
1044
1299
1017
.
.
.
2015-10 : num 1274 1380 1037 1296 1016 ...
2015

11
:
n
u
m
1271
1376
1027
1291
1009
.
.
.
2015-12 : num 1269 1370 1018 1290 1004 ...
2016

01
:
n
u
m
1274
1372
1014
1293
1006
.
.
.
2016-02 : num 1278 1376 1013 1297 1011 ...
2016

03
:
n
u
m
1284
1384
1014
1305
1018
.
.
.
2016-04 : num 1289 1388 1014 1313 1022 ...
2016

05
:
n
u
m
1298
1391
1018
1322
1029
.
.
.
2016-06 : num 1307 1392 1027 1329 1035 ...
2016

07
:
n
u
m
1315
1393
1034
1335
1039
.
.
.
2016-08 : num 1321 1394 1037 1341 1041 ...
2016

09
:
n
u
m
1328
1395
1037
1344
1039
.
.
.
2016-10 : num 1332 1396 1034 1344 1034 ...
2016

11
:
n
u
m
1332
1398
1032
1341
1028
.
.
.
2016-12 : num 1330 1398 1033 1340 1018 ...
2017

01
:
n
u
m
1328
1396
1032
1338
1008
.
.
.
2017-02 : num 1328 1398 1032 1337 1005 ...
2017

03
:
n
u
m
1330
1406
1030
1338
1011
.
.
.
2017-04 : num 1332 1418 1033 1344 1022 ...
2017

05
:
n
u
m
1337
1428
1037
1355
1031
.
.
.
2017-06 : num 1343 1435 1042 1365 1039 ...
2017

07
:
n
u
m
1352
1439
1052
1370
1047
.
.
.
2017-08 : num 1364 1442 1068 1371 1057 ...
2017

09
:
n
u
m
1375
1444
1084
1375
1067
.
.
.
2017-10 : num 1384 1444 1097 1379 1076 ...
2017

11
:
n
u
m
1390
1443
1100
1379
1081
.
.
.
2017-12 : num 1392 1441 1101 1374 1084 ...
2018

01
:
n
u
m
1392
1438
1099
1368
1083
.
.
.
2018-02 : num 1392 1438 1099 1366 1084 ...
2018

03
:
n
u
m
1391
1439
1099
1369
1082
.
.
.
2018-04 : num 1391 1441 1099 1372 1082 ...
2018

05
:
n
u
m
1391
1442
1099
1376
1082
.
.
.
2018-06 : num 1391 1443 1099 1377 1081 ...
$ 2018-07 : num 1391 1443 1099 1378 1081 ...
[list output truncated]

attr(*, "spec")=
.. cols(
.. RegionID = col_double(),
.. RegionName = col_character(),
.. State = col_character(),
.. Metro = col_character(),
.. CountyName = col_character(),
.. SizeRank = col_double(),
.. 2010-11 = col_double(),
.. 2010-12 = col_double(),
.. 2011-01 = col_double(),
.. 2011-02 = col_double(),
.. 2011-03 = col_double(),
.. 2011-04 = col_double(),
.. 2011-05 = col_double(),
.. 2011-06 = col_double(),
.. 2011-07 = col_double(),
.. 2011-08 = col_double(),
.. 2011-09 = col_double(),
.. 2011-10 = col_double(),
.. 2011-11 = col_double(),
.. 2011-12 = col_double(),
.. 2012-01 = col_double(),
.. 2012-02 = col_double(),
.. 2012-03 = col_double(),
.. 2012-04 = col_double(),
.. 2012-05 = col_double(),
.. 2012-06 = col_double(),
.. 2012-07 = col_double(),
.. 2012-08 = col_double(),
.. 2012-09 = col_double(),
.. 2012-10 = col_double(),
.. 2012-11 = col_double(),
.. 2012-12 = col_double(),
.. 2013-01 = col_double(),
.. 2013-02 = col_double(),
.. 2013-03 = col_double(),
.. 2013-04 = col_double(),
.. 2013-05 = col_double(),
.. 2013-06 = col_double(),
.. 2013-07 = col_double(),
.. 2013-08 = col_double(),
.. 2013-09 = col_double(),
.. 2013-10 = col_double(),
.. 2013-11 = col_double(),
.. 2013-12 = col_double(),
.. 2014-01 = col_double(),
.. 2014-02 = col_double(),
.. 2014-03 = col_double(),
.. 2014-04 = col_double(),
.. 2014-05 = col_double(),
.. 2014-06 = col_double(),
.. 2014-07 = col_double(),
.. 2014-08 = col_double(),
.. 2014-09 = col_double(),
.. 2014-10 = col_double(),
.. 2014-11 = col_double(),
.. 2014-12 = col_double(),
.. 2015-01 = col_double(),
.. 2015-02 = col_double(),
.. 2015-03 = col_double(),
.. 2015-04 = col_double(),
.. 2015-05 = col_double(),
.. 2015-06 = col_double(),
.. 2015-07 = col_double(),
.. 2015-08 = col_double(),
.. 2015-09 = col_double(),
.. 2015-10 = col_double(),
.. 2015-11 = col_double(),
.. 2015-12 = col_double(),
.. 2016-01 = col_double(),
.. 2016-02 = col_double(),
.. 2016-03 = col_double(),
.. 2016-04 = col_double(),
.. 2016-05 = col_double(),
.. 2016-06 = col_double(),
.. 2016-07 = col_double(),
.. 2016-08 = col_double(),
.. 2016-09 = col_double(),
.. 2016-10 = col_double(),
.. 2016-11 = col_double(),
.. 2016-12 = col_double(),
.. 2017-01 = col_double(),
.. 2017-02 = col_double(),
.. 2017-03 = col_double(),
.. 2017-04 = col_double(),
.. 2017-05 = col_double(),
.. 2017-06 = col_double(),
.. 2017-07 = col_double(),
.. 2017-08 = col_double(),
.. 2017-09 = col_double(),
.. 2017-10 = col_double(),
.. 2017-11 = col_double(),
.. 2017-12 = col_double(),
.. 2018-01 = col_double(),
.. 2018-02 = col_double(),
.. 2018-03 = col_double(),
.. 2018-04 = col_double(),
.. 2018-05 = col_double(),
.. 2018-06 = col_double(),
.. 2018-07 = col_double(),
.. 2018-08 = col_double(),
.. 2018-09 = col_double(),
.. 2018-10 = col_double()
.. )

I cannot see any evidence in what you have posted that there are missing data, though it is rather difficult to read due to formatting problems. There is not a limit of 50 columns when working with data. There is a limit, I think, in the number of columns you can view at one time. Look at the output of

summary(SingleFamilyResidenceSales)

That will give you statistics on each column like the minimum, median and maximum. Does that show data in all of the columns?

Hi Lori,

This link my answer your question about viewing more than 50 columns: https://github.com/rstudio/rstudio/issues/5170#issuecomment-517369446