Re: [R] List / Matrix to Data Frame

2021-07-02 Thread Sparks, John
Works like a charm. Thanks so much. --John Sparks From: Bill Dunlap Sent: Thursday, July 1, 2021 8:01 PM To: Sparks, John Cc: r-help@r-project.org Subject: Re: [R] List / Matrix to Data Frame Does this do what you want? > df <- data.frame(check.names

Re: [R] List / Matrix to Data Frame

2021-07-01 Thread Avi Gross via R-help
8186 5 2016-09-30 45687 84263 6 2015-09-30 53394 93626 It may be easier to work with this, but again, if you need the dates to be real dates, as in graphing. Hope that helps. -Original Message- From: R-help On Behalf Of Bill Dunlap Sent: Thursday, July 1, 2021 9:01 PM To

Re: [R] List / Matrix to Data Frame

2021-07-01 Thread Bill Dunlap
Does this do what you want? > df <- data.frame(check.names=FALSE, lapply(c(Date="date",netIncome="netIncome",`Gross Profit`="grossProfit"), function(nm)vapply(ISY, "[[", nm, FUN.VALUE=NA_character_))) > str(df) 'data.frame': 36 obs. of 3 variables: $ Date: chr "2020-09-30" "2019-09-30

[R] List / Matrix to Data Frame

2021-07-01 Thread Sparks, John
Hi R-Helpers, I am taking it upon myself to delve into the world of lists for R. In no small part because I appear to have discovered a source of data for an exceptionally good price but that delivers much of that data in json format. So over the last day or so I managed to fight the list proc