Re: [R] Question about Rfast colMins and colMaxs

2021-12-03 Thread Stephen H. Dawson, DSL via R-help
Thanks, Richard. I am researching other library options for data inspection. I have many csv files I am reviewing with different column names and data types. Flexibility of a quick review of max and min is quite valuable at this juncture. I will implement your code recommendation next week a

Re: [R] Question about Rfast colMins and colMaxs

2021-12-02 Thread Richard O'Keefe
What puzzles me is why you are not just using lapply(some.data.frame, min) lapply(some.data.frame, max) or as.vector(lapply(...)) Why go to another package for this? Is it the indices you want? col.min.indices <- function (some.data.frame) { v <- sapply(some.data.frame, function (column)

Re: [R] Question about Rfast colMins and colMaxs

2021-12-02 Thread Stephen H. Dawson, DSL via R-help
d a minimum may be elusive. -Original Message- From: R-help On Behalf Of Stephen H. Dawson, DSL via R-help Sent: Tuesday, November 30, 2021 5:37 PM To: Bert Gunter Cc: r-help@r-project.org Subject: Re: [R] Question about Rfast colMins and colMaxs Oh, you are segmenting standard R from the

Re: [R] Question about Rfast colMins and colMaxs

2021-12-01 Thread Bert Gunter
onality and tries to > >coerce it with as.matrix or as.array first. As others have noted, this mean > >a data.frame containing non-numeric parts may fail or should have any other > >columns hidden/removed as in this df that has some non-numeric fields: > > > >> df >

Re: [R] Question about Rfast colMins and colMaxs

2021-12-01 Thread Stephen H. Dawson, DSL via R-help
minimum may be elusive. -Original Message- From: R-help On Behalf Of Stephen H. Dawson, DSL via R-help Sent: Tuesday, November 30, 2021 5:37 PM To: Bert Gunter Cc: r-help@r-project.org Subject: Re: [R] Question about Rfast colMins and colMaxs Oh, you are segmenting standard R from the rest of R.

Re: [R] Question about Rfast colMins and colMaxs

2021-12-01 Thread Stephen H. Dawson, DSL via R-help
-Original Message- From: R-help On Behalf Of Stephen H. Dawson, DSL via R-help Sent: Wednesday, December 1, 2021 5:11 PM To: r-help@r-project.org Subject: Re: [R] Question about Rfast colMins and colMaxs Jeff, Can you use max and min evaluations on any other data type then numeric? If so, how

Re: [R] Question about Rfast colMins and colMaxs

2021-12-01 Thread Stephen H. Dawson, DSL via R-help
i [1] 1 $f [1] 1.2 $i2 [1] 3 Clearly converting that to a matrix while whole would result in everything being converted to character and a minimum may be elusive. -Original Message- From: R-help On Behalf Of Stephen H. Dawson, DSL via R-help Sent: Tuesday, November 30, 2021 5:37 PM To: Be

Re: [R] Question about Rfast colMins and colMaxs

2021-12-01 Thread Jeff Newmiller
his: > >> mycolMins(df[, sapply(df, is.numeric)]) >$i >[1] 1 > >$f >[1] 1.2 > >$i2 >[1] 3 > >Clearly converting that to a matrix while whole would result in everything >being converted to character and a minimum may be elusive. > >-Original Mess

Re: [R] Question about Rfast colMins and colMaxs

2021-12-01 Thread PIKAL Petr
no obvious candidate for the minimum.) Cheers Petr > -Original Message- > From: R-help On Behalf Of Stephen H. > Dawson, DSL via R-help > Sent: Wednesday, December 1, 2021 5:11 PM > To: r-help@r-project.org > Subject: Re: [R] Question about Rfast colMins and colMaxs &

Re: [R] Question about Rfast colMins and colMaxs

2021-12-01 Thread Stephen H. Dawson, DSL via R-help
Jeff, Can you use max and min evaluations on any other data type then numeric? If so, how do you evaluate max or min of text content? String length? Ascii values of text characters? *Stephen Dawson, DSL* /Executive Strategy Consultant/ Business & Technology +1 (865) 804-3454 http://www.shdaw

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Avi Gross via R-help
x while whole would result in everything being converted to character and a minimum may be elusive. -Original Message- From: R-help On Behalf Of Stephen H. Dawson, DSL via R-help Sent: Tuesday, November 30, 2021 5:37 PM To: Bert Gunter Cc: r-help@r-project.org Subject: Re: [R] Question abou

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Bert Gunter
If you look at my original reply, it gives the link that tells you *exactly* what packages are "standard" (and all the thousands of others which therefore are not). Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkel

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Stephen H. Dawson, DSL via R-help
Oh, you are segmenting standard R from the rest of R. Well, that part did not come across to me in your original reply. I am not clear on a standard versus non-standard list. I will look into this aspect and see what I can learn going forward. Thanks, *Stephen Dawson, DSL* /Executive Strateg

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Bert Gunter
... but Rfast is *not* a "standard" package, as the rest of the PG excerpt says. So contact the maintainer and ask him/her what they think the best practice should be for their package. As has been pointed out already, it appears to differ from the usual "read it in as a data frame" procedure. Ber

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Stephen H. Dawson, DSL via R-help
Well, no it is not. The email list stripped off the attachment. The data is numeric, happens to be all whole numbers. Kindest Regards, *Stephen Dawson, DSL* /Executive Strategy Consultant/ Business & Technology +1 (865) 804-3454 http://www.shdawson.com On 11/30/21 5:

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Stephen H. Dawson, DSL via R-help
Thanks, Bill. How do you go about getting maximum and minimum values from your columns? Do you simply do them one column at a time? The functions I am identifying from Rfast do this work in bulk. *Stephen Dawson, DSL* /Executive Strategy Consultant/ Business & Technology +1 (865) 804-3454 ht

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Stephen H. Dawson, DSL via R-help
Hi Jeff, Thanks for the data review offer. Attached is the CSV. *Stephen Dawson, DSL* /Executive Strategy Consultant/ Business & Technology +1 (865) 804-3454 http://www.shdawson.com On 11/30/21 3:29 PM, Jeff Newmiller wrote: I don't know anything about this package

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Stephen H. Dawson, DSL via R-help
Right, R Studio is not R. However, the Rfast package is part of R. https://cran.r-project.org/web/packages/Rfast/index.html So, rephrasing my question... What is the best practice to bring a csv file into R so it can be accessed by colMaxs and colMins, please? *Stephen Dawson, DSL* /Executiv

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Jeff Newmiller
I don't know anything about this package, but read.csv returns a data frame. How you go about forming a matrix using that data frame depends what is in it. If it is all numeric then as.matrix may be all you need. Half of any R data analysis is data... and the details are almost always crucial.

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Bill Dunlap
You can use as.matrix() to convert your data.frame to a matrix, but that loses the speed/space advantages of colMins (as well as causing issues if some columns are not numeric). You could write to the maintainer of the package to ask that data.frames be directly supported. In the meantime you cou

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Bert Gunter
RStudio is **not** R. In particular, the so-called TidyVerse consists of all *non*-standard contributed packages, about which the PG says: "For questions about functions in standard packages distributed with R (see the FAQ Add-on packages in R), ask questions on R-help. [The link is: https://cran.

[R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Stephen H. Dawson, DSL via R-help
Hi, I am working to understand the Rfast functions of colMins and colMaxs. I worked through the example listed on page 54 of the PDF. https://cran.r-project.org/web/packages/Rfast/index.html https://cran.r-project.org/web/packages/Rfast/Rfast.pdf My data is in a CSV file. So, I bring it int