[R] Multiple Data Import Excel

PIKAL Petr petr@p|k@| @end|ng |rom prechez@@cz
Tue Jan 4 09:05:36 CET 2022


Hi

Try readxl package which has possibility to limit range of cells for
reading.

https://cran.r-project.org/web/packages/readxl/readxl.pdf

Cheers
Petr

> -----Original Message-----
> From: R-help <r-help-bounces using r-project.org> On Behalf Of Bradley Heins via
> R-help
> Sent: Tuesday, January 4, 2022 4:20 AM
> To: r-help using r-project.org
> Subject: [R] Multiple Data Import Excel
> 
> Hello,
> I have 2100 Excel files (.xlsx) that I need to read and combine into 1
file.
> I am perplexed because the first 6 lines are header information and the
8th
> line are the columns that are needed with the data in columns.
> 
> I need to save the first last (IceTag ID) because that number becomes the
ID
> for all of the data in each specific Excel file.  The ID can be different
for
> spreadsheets.
> 
> Line 2 to 7 are not needed.
> Line 8 are the column headers.
> 
> The columns are Date, Time, Motion Standing (in time format), Lying (In
time
> format), Steps and bouts.  See example below.
> 
> Any help in reading in multiple files and discarding some lines would be
> appreciated.
> Regards,
> Brad
> 
> 
> 
> IceTag ID: 61409782
> Site ID: n/a
> Animal ID: n/a
> First Record: 05/18/2021 14:04:27
> Last Record: 05/25/2021 14:00:51
> File Time Zone: Central Standard Time
> 
> Date             Time    Motion StandingT LyingT Steps Bouts
> 05/18/2021 14:04:27  65  0:10:29 0:00:04 20 1
> 05/18/2021 14:15:00 69 0:08:52 0:06:08 15 1
> 
> 
> --
> Bradley J. Heins
> Extension Specialist, Dairy Management | Extension | extension.umn.edu
> Associate Professor, Dairy Management | West Central ROC |
> wcroc.cfans.umn.edu University of Minnesota | umn.edu
> 46352 State Hwy 329, Morris, MN 56267
> hein0106 using umn.edu | 320-589-1711, Ext. 2118
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.


More information about the R-help mailing list