Re: [R] splitting data matrix into submatrices

2022-01-04 Thread Jeff Newmiller
Please reply all so the mailing list is included in the discussion. I don't do 1:1 tutoring and others can chime in if I make a mistake. I would say you don't understand what my example did, since it doesn't care how many columns are in your data frame. If you are in fact working with a matrix,

Re: [R] splitting data matrix into submatrices

2022-01-04 Thread Jeff Newmiller
A lot of new R users fail to grasp what makes data frames more useful than matrices, or use data frames without even realizing they are not using matrices. This is important because there are more tools for manipulating data frames than matrices. One tool is the split function... if you have a v

Re: [R] splitting data matrix into submatrices

2022-01-04 Thread Avi Gross via R-help
If you explain better, we can help. But first consider what you are asking and how it is relected in the data. Is the first component a row number whose meaning is day 1 contains a 1 or perhaps 0 and the next row contains one more? Or is there some kind of date in there? What day of the week i

[R] splitting data matrix into submatrices

2022-01-04 Thread Faheem Jan via R-help
I have data in a matrix form of order 1826*24 where 1826 represents the days and 24 hourly observations on each data. My objective is to split the matrix into working (Monday to Friday) and non-working (Saturday and Sunday) submatrices. Can anyone help me that how I will do that splitting using

Re: [R] how to run r biotools boxM terst on multiple groups?

2022-01-04 Thread Luigi Marongiu
thanks, this is essentially merging bin and species into a single variable. I was more interested in knowing if boxM can run on multiple classes directly... On Tue, Jan 4, 2022 at 12:34 PM PIKAL Petr wrote: > > Hi. > > Not sure if statistically correct but what about > > iris$int<- interaction(ir

Re: [R] how to run r biotools boxM terst on multiple groups?

2022-01-04 Thread PIKAL Petr
Hi. Not sure if statistically correct but what about iris$int<- interaction(iris$bin, iris$Species) boxM(iris[,1:4], iris[,7]) Cheers Petr > -Original Message- > From: R-help On Behalf Of Luigi Marongiu > Sent: Tuesday, January 4, 2022 11:56 AM > To: r-help > Subject: [R] how to run r

[R] how to run r biotools boxM terst on multiple groups?

2022-01-04 Thread Luigi Marongiu
I have a data frame containing a half dozen continuous measurements and over a dozen ordinal variables (such as, death, fever, symptoms etc). I would like to run a box matrix test and I am using biotools' boxM, but it allows to run only one ordinal group at the time. For instance: ``` >data(iris) >

Re: [R] Multiple Data Import Excel

2022-01-04 Thread Jeff Newmiller
Reading Excel files isn't a feature of base R (the topic here... read the Posting Guide linked below) but the readxl contributed package can help with that. The read_xlsx function has arguments to skip rows, limit the number of rows read in, or specify regions to import such as B2:B2. Read the h

Re: [R] Multiple Data Import Excel

2022-01-04 Thread PIKAL Petr
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 On Behalf Of Bradley Heins via > R-help > Sent: Tuesday, January 4, 2022 4:20 AM > To: r-help@r-pro