Sorkin, John wrote/hat geschrieben on/am 01.07.2024 17:54:
#I am trying to write code that will create a matrix with a variable number of
columns where the #number of columns is 1+Grps
#I can do this:
NSims <- 4
Grps <- 5
DiffMeans <- matrix(nrow=NSims,ncol=1+Grps)
DiffMeans
#I have a problem w
I think you should reconsider your goal. Matrices must have all elements of the
same type, and in this case you seem to be trying to mix a number of something
(integer) with mean values (double). This would normally be stored together in
a data frame or separately in a vector for counts and a ma
Às 16:54 de 01/07/2024, Sorkin, John escreveu:
#I am trying to write code that will create a matrix with a variable number of
columns where the #number of columns is 1+Grps
#I can do this:
NSims <- 4
Grps <- 5
DiffMeans <- matrix(nrow=NSims,ncol=1+Grps)
DiffMeans
#I have a problem when I try to
Às 16:54 de 01/07/2024, Sorkin, John escreveu:
#I am trying to write code that will create a matrix with a variable number of
columns where the #number of columns is 1+Grps
#I can do this:
NSims <- 4
Grps <- 5
DiffMeans <- matrix(nrow=NSims,ncol=1+Grps)
DiffMeans
#I have a problem when I try to
onday, July 1, 2024 11:54 AM
To: r-help@r-project.org (r-help@r-project.org)
Subject: [R] Create matrix with variable number of columns AND CREATE NAMES FOR
THE COLUMNS
[External Email]
#I am trying to write code that will create a matrix with a variable number of
columns where the #number of col
#I am trying to write code that will create a matrix with a variable number of
columns where the #number of columns is 1+Grps
#I can do this:
NSims <- 4
Grps <- 5
DiffMeans <- matrix(nrow=NSims,ncol=1+Grps)
DiffMeans
#I have a problem when I try to name the columns of the matrix. I want the
firs
6 matches
Mail list logo