Read number of rows on excel import

appetizer
import data
mild spicy
Author

Ryan Garnett

Published

April 3, 2023

Description
Read a specific number of rows when reading an excel file
Ingredients
Package Data

readxl

sample_housing_data.xlsx


Sample Instructions

package::function("file_path/file_name.xlsx", n_max = number)


Actual Instructions

readxl::read_excel("C:/data/sample.xlsx", n_max = 5)


Output

municipal_unit assessment_account_number civic_number civic_additional civic_direction civic_street_name civic_street_suffix civic_city_name tax_year assessed_value taxable_assessed_value y_map_coordinate x_map_coordinate map_coordinates
HALIFAX REGIONAL MUNICIPALITY (HRM) 4610415 40 NA NA JUNIPER CRES EASTERN PASSAGE 2018 57100 42700 NA NA NA
HALIFAX REGIONAL MUNICIPALITY (HRM) 10535174 15 NA NA KINGS WHARF PL DARTMOUTH 2020 282700 282700 NA NA NA
HALIFAX REGIONAL MUNICIPALITY (HRM) 822639 40 NA NA CAMPBELL AVE DARTMOUTH 2020 26600 16800 NA NA NA
HALIFAX REGIONAL MUNICIPALITY (HRM) 9037063 275 NA NA WINDMILL RD DARTMOUTH 2020 72500 72500 NA NA NA
HALIFAX REGIONAL MUNICIPALITY (HRM) 10535301 15 NA NA KINGS WHARF PL DARTMOUTH 2018 283200 283200 NA NA NA