I have looked through the help files and have not found my answer.
I have a .dat file which lists variables and contains their data.
in the 'var.dat' file the first lines look like this: (I've cut it down for ease of viewing)
"N" <- 55872
"Nc" <- 49
"g0" <- c(0, 0)
"G0" <- structure(c(0.1, 0, 0, 0.1), .Dim = c(2, 2))
"group" <- c(1, 1, 1, 1, 1, 1, 1, 1, 1)
"X" <- structure(c(1, 1, 1, 1, 1, 1, 1)
"y" <- c(10, 10, 10, 9, 4, 10, 10)
"var1" <- c(8.7, 3.7, 3.6, 3.1, 8.9)
"Tau" <- structure(c(0.1, 0, 0, 0, 0.1, 0, 0, 0, 0.1), .Dim = c(3, 3))
Here is my question.
in the following line of code I need to reference the var.dat file.
How is this code calling the file? Where do I need to save it so the code can access the file= function? Do I need to load it first?
mod.dat<- cat(dump.format(list(
N = nrow(X), Nc = length(group), g0 = c(0,0), G0 =
diag(2)*.1, group=grp, X=X, y = dat$dv, var=var[,2], Tau =
diag(3)*.1)), file="var.dat")
Thanks.