Patrick (Malone Quantitative)
2020-Jun-23 15:08 UTC
[R] Help with locating error on import of data
It looks like it's looking for column names in the first row of your Excel sheet and not finding them. What does the first row contain? On Tue, Jun 23, 2020 at 10:57 AM Ahson via R-help <r-help at r-project.org> wrote:> I have imported data from an Excel file and I am getting errors: > > > library(readxl) > > Balance_sheet <- read_excel("Y:/All Documents/Training/Data/Routines for > consolidating all the data/Individual tables/AIM > companies/Balance_sheet.xlsx", na = "") > New names: > * `` -> ...6 > * `` -> ...7 > * `` -> ...9 > * `` -> ...10 > * `` -> ...11 > * ... and 22 more problems > > > How can I find where the error is originating? What does New names mean? > > Thanks in advance for your help. > > > Sent from Mail for Windows 10 > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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. >-- Patrick S. Malone, Ph.D., Malone Quantitative NEW Service Models: http://malonequantitative.com He/Him/His [[alternative HTML version deleted]]
one of the problems with Excel is that people can put anything in any column. You might want to restrict which columns you are reading since if it finds data in some cells and there is not a header, it will create one. Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you want to do it. On Tue, Jun 23, 2020 at 8:09 AM Patrick (Malone Quantitative) <malone at malonequantitative.com> wrote:> > It looks like it's looking for column names in the first row of your Excel > sheet and not finding them. What does the first row contain? > > On Tue, Jun 23, 2020 at 10:57 AM Ahson via R-help <r-help at r-project.org> > wrote: > > > I have imported data from an Excel file and I am getting errors: > > > > > library(readxl) > > > Balance_sheet <- read_excel("Y:/All Documents/Training/Data/Routines for > > consolidating all the data/Individual tables/AIM > > companies/Balance_sheet.xlsx", na = "") > > New names: > > * `` -> ...6 > > * `` -> ...7 > > * `` -> ...9 > > * `` -> ...10 > > * `` -> ...11 > > * ... and 22 more problems > > > > > > How can I find where the error is originating? What does New names mean? > > > > Thanks in advance for your help. > > > > > > Sent from Mail for Windows 10 > > > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > R-help at 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. > > > > > -- > Patrick S. Malone, Ph.D., Malone Quantitative > NEW Service Models: http://malonequantitative.com > > He/Him/His > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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.