Spencer Brackett
2019-Jul-08 14:26 UTC
[R] Using options(max.print = 1000000) to read in data
Thank you, Here is a summary of the resulting output....>nrow(GBM.txt)[1] 20530> ncol(GBM.txt)[1] 173 This corresponds with the info found in my global environment for the object indicated. Now, how do I go about determining if the dataset is a matrix? On Mon, Jul 8, 2019 at 10:16 AM Kevin Thorpe <kevin.thorpe at utoronto.ca> wrote:> > > On Jul 8, 2019, at 10:06 AM, Spencer Brackett < > spbrackett20 at saintjosephhs.com> wrote: > > > > Hello, > > > > I am trying to reload some data into R in order to check to see if it is > > formatted as a matrix. I used the command options(max.print = 10000000) > to > > account for the 20,000 some rows omitted previously when just using the > > basic version of this function. After entering this command, the dataset > > mostly loaded into R, but 14717 rows were still omitted. > > > > Can I simply increase the number indicted after 'max.print =' to read in > > the remaining rows, or should I use 'bigfile.sample <-' or > > 'bigfile.colclass <-' instead? Do I even need to read in all of the rows > to > > test for a matrix? > > > > Best, > > > > Spencer > > > > I don?t think this option affects how much data is read in, just how much > is printed to the screen. Use the function str() on your imported object to > see how many rows, among other things, were brought in. > > > > [[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. > > > -- > Kevin E. Thorpe > Head of Biostatistics, Applied Health Research Centre (AHRC) > Li Ka Shing Knowledge Institute of St. Michael's > Assistant Professor, Dalla Lana School of Public Health > University of Toronto > email: kevin.thorpe at utoronto.ca Tel: 416.864.5776 Fax: 416.864.3016 > >[[alternative HTML version deleted]]
Hello, Inline. ?s 15:26 de 08/07/19, Spencer Brackett escreveu:> Thank you, > > Here is a summary of the resulting output.... > >> nrow(GBM.txt) > [1] 20530 >> ncol(GBM.txt) > [1] 173 > > This corresponds with the info found in my global environment for the > object indicated. Now, how do I go about determining if the dataset is a > matrix?Try any of str(GBM.txt) class(GBM.txt) Also, like Kevin said, max.print only affects how much is printed, not the read functions. Why change max.print at all? The default value (1000) is large enough, I have never needed to see more than this at a time. In fact, to have an idea of the data I would rather further limit the number of matrix lines printed with head(object) tail(object) Hope this helps, Rui Barradas> > > On Mon, Jul 8, 2019 at 10:16 AM Kevin Thorpe <kevin.thorpe at utoronto.ca> > wrote: > >> >>> On Jul 8, 2019, at 10:06 AM, Spencer Brackett < >> spbrackett20 at saintjosephhs.com> wrote: >>> >>> Hello, >>> >>> I am trying to reload some data into R in order to check to see if it is >>> formatted as a matrix. I used the command options(max.print = 10000000) >> to >>> account for the 20,000 some rows omitted previously when just using the >>> basic version of this function. After entering this command, the dataset >>> mostly loaded into R, but 14717 rows were still omitted. >>> >>> Can I simply increase the number indicted after 'max.print =' to read in >>> the remaining rows, or should I use 'bigfile.sample <-' or >>> 'bigfile.colclass <-' instead? Do I even need to read in all of the rows >> to >>> test for a matrix? >>> >>> Best, >>> >>> Spencer >>> >> >> I don?t think this option affects how much data is read in, just how much >> is printed to the screen. Use the function str() on your imported object to >> see how many rows, among other things, were brought in. >> >> >>> [[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. >> >> >> -- >> Kevin E. Thorpe >> Head of Biostatistics, Applied Health Research Centre (AHRC) >> Li Ka Shing Knowledge Institute of St. Michael's >> Assistant Professor, Dalla Lana School of Public Health >> University of Toronto >> email: kevin.thorpe at utoronto.ca Tel: 416.864.5776 Fax: 416.864.3016 >> >> > > [[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. >
Why did you not do as Kevin suggested?? Or, more simply, ?is.matrix which could be found in ?matrix. *Please* consult R's docs before posting such queries. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Jul 8, 2019 at 7:27 AM Spencer Brackett < spbrackett20 at saintjosephhs.com> wrote:> Thank you, > > Here is a summary of the resulting output.... > > >nrow(GBM.txt) > [1] 20530 > > ncol(GBM.txt) > [1] 173 > > This corresponds with the info found in my global environment for the > object indicated. Now, how do I go about determining if the dataset is a > matrix? > > > On Mon, Jul 8, 2019 at 10:16 AM Kevin Thorpe <kevin.thorpe at utoronto.ca> > wrote: > > > > > > On Jul 8, 2019, at 10:06 AM, Spencer Brackett < > > spbrackett20 at saintjosephhs.com> wrote: > > > > > > Hello, > > > > > > I am trying to reload some data into R in order to check to see if it > is > > > formatted as a matrix. I used the command options(max.print = 10000000) > > to > > > account for the 20,000 some rows omitted previously when just using the > > > basic version of this function. After entering this command, the > dataset > > > mostly loaded into R, but 14717 rows were still omitted. > > > > > > Can I simply increase the number indicted after 'max.print =' to read > in > > > the remaining rows, or should I use 'bigfile.sample <-' or > > > 'bigfile.colclass <-' instead? Do I even need to read in all of the > rows > > to > > > test for a matrix? > > > > > > Best, > > > > > > Spencer > > > > > > > I don?t think this option affects how much data is read in, just how much > > is printed to the screen. Use the function str() on your imported object > to > > see how many rows, among other things, were brought in. > > > > > > > [[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. > > > > > > -- > > Kevin E. Thorpe > > Head of Biostatistics, Applied Health Research Centre (AHRC) > > Li Ka Shing Knowledge Institute of St. Michael's > > Assistant Professor, Dalla Lana School of Public Health > > University of Toronto > > email: kevin.thorpe at utoronto.ca Tel: 416.864.5776 Fax: 416.864.3016 > > > > > > [[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. >[[alternative HTML version deleted]]
Spencer Brackett
2019-Jul-08 14:43 UTC
[R] Using options(max.print = 1000000) to read in data
Using str(GBM.txt) produced the same output as last time, which lists the number of objects acting on a particular number of variables for the said dataset and a few rows read from the original file. The result of class(GBM.txt) generates the following..> class(GBM.txt)[1] "data.frame" Is this to say that the object is set as a 'data frame', opposed to a 'matrix' ? I will try running ?is.matrix now On Mon, Jul 8, 2019 at 10:33 AM Rui Barradas <ruipbarradas at sapo.pt> wrote:> Hello, > > Inline. > > ?s 15:26 de 08/07/19, Spencer Brackett escreveu: > > Thank you, > > > > Here is a summary of the resulting output.... > > > >> nrow(GBM.txt) > > [1] 20530 > >> ncol(GBM.txt) > > [1] 173 > > > > This corresponds with the info found in my global environment for the > > object indicated. Now, how do I go about determining if the dataset is a > > matrix? > > Try any of > > str(GBM.txt) > class(GBM.txt) > > Also, like Kevin said, max.print only affects how much is printed, not > the read functions. Why change max.print at all? The default value > (1000) is large enough, I have never needed to see more than this at a > time. In fact, to have an idea of the data I would rather further limit > the number of matrix lines printed with > > head(object) > tail(object) > > > > Hope this helps, > > Rui Barradas > > > > > > On Mon, Jul 8, 2019 at 10:16 AM Kevin Thorpe <kevin.thorpe at utoronto.ca> > > wrote: > > > >> > >>> On Jul 8, 2019, at 10:06 AM, Spencer Brackett < > >> spbrackett20 at saintjosephhs.com> wrote: > >>> > >>> Hello, > >>> > >>> I am trying to reload some data into R in order to check to see if > it is > >>> formatted as a matrix. I used the command options(max.print = 10000000) > >> to > >>> account for the 20,000 some rows omitted previously when just using the > >>> basic version of this function. After entering this command, the > dataset > >>> mostly loaded into R, but 14717 rows were still omitted. > >>> > >>> Can I simply increase the number indicted after 'max.print =' to > read in > >>> the remaining rows, or should I use 'bigfile.sample <-' or > >>> 'bigfile.colclass <-' instead? Do I even need to read in all of the > rows > >> to > >>> test for a matrix? > >>> > >>> Best, > >>> > >>> Spencer > >>> > >> > >> I don?t think this option affects how much data is read in, just how > much > >> is printed to the screen. Use the function str() on your imported > object to > >> see how many rows, among other things, were brought in. > >> > >> > >>> [[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. > >> > >> > >> -- > >> Kevin E. Thorpe > >> Head of Biostatistics, Applied Health Research Centre (AHRC) > >> Li Ka Shing Knowledge Institute of St. Michael's > >> Assistant Professor, Dalla Lana School of Public Health > >> University of Toronto > >> email: kevin.thorpe at utoronto.ca Tel: 416.864.5776 Fax: 416.864.3016 > >> > >> > > > > [[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. > > >[[alternative HTML version deleted]]
Stephen Ellison
2019-Jul-08 15:33 UTC
[R] Using options(max.print = 1000000) to read in data
> This corresponds with the info found in my global environment for the > object indicated. Now, how do I go about determining if the dataset is a > matrix?Consider ?is.matrix ? S Ellison ******************************************************************* This email and any attachments are confidential. Any use, copying or disclosure other than by the intended recipient is unauthorised. If you have received this message in error, please notify the sender immediately via +44(0)20 8943 7000 or notify postmaster at lgcgroup.com and delete this message and any copies from your computer and network. LGC Limited. Registered in England 2991879. Registered office: Queens Road, Teddington, Middlesex, TW11 0LY, UK