Re: [R] 3 way crosstable not working

2025-03-25 Thread Rui Barradas
Às 17:43 de 25/03/2025, varin sacha via R-help escreveu: Dear R-experts, Here below a toy example not working. After some researches on the Net, still don't get it ! Many thanks for your precious help. # library(knitr) library(ggplot2) library(pollster) library(dp

[R] 3 way crosstable not working

2025-03-25 Thread varin sacha via R-help
Dear R-experts, Here below a toy example not working. After some researches on the Net, still don't get it ! Many thanks for your precious help. # library(knitr) library(ggplot2) library(pollster) library(dplyr)   statut=c("married","not married","not married","mar

Re: [R] PLOTTING ODE MODEL RESULTS USING PLOT.DESOLVE FROM THE DESOLVE PACKAGE

2025-03-25 Thread Jeff Newmiller via R-help
a) Do be sure to read the Posting Guide... for example changes to contributed packages is appropriate for communicating directly to the maintainer or via the recommended forum for that contributed package. Also, you will avoid mis-communication more reliably if you follow the guide recommendatio

Re: [R] how to create model matrix of second order terms

2025-03-25 Thread Stephen Bond via R-help
@ Rui that is the idea, but how do I apply this to a matrix with 200 columns? I cannot write out the expression.  The colnames seem very messy, but they would be messy even under my scheme with as little as 100 vars. On Tue, 2025-03-25 at 06:15 +, Rui Barradas wrote: > Às 15:28 de 24/03/2025,

[R] PLOTTING ODE MODEL RESULTS USING PLOT.DESOLVE FROM THE DESOLVE PACKAGE

2025-03-25 Thread Mariam Idowu
Hi Everyone, I trust this email finds you well, I am currently running an ODE model using the plot.desolve method from the deSolve package. For context my model is a box model with 75 boxes, therefore for each variable I will get 75 outputs. I am currently comparing the results of my model to obs

Re: [R] how to create model matrix of second order terms

2025-03-25 Thread Rui Barradas
Hello, Sorry, much simpler: poly(as.matrix(X), degree = 2L) Hope this helps, Rui Barradas Às 13:58 de 25/03/2025, Rui Barradas escreveu: Hello, This seems to work and is independent of the number of columns. 'p' is the output in my previous post. f <- function(x, data = X) with(data,

Re: [R] how to create model matrix of second order terms

2025-03-25 Thread Rui Barradas
Hello, This seems to work and is independent of the number of columns. 'p' is the output in my previous post. f <- function(x, data = X) with(data, eval(parse(text = x))) p2 <- poly(sapply(names(X), f), degree = 2L) identical(p, p2) # [1] TRUE Hope this helps, Rui Barradas Às 13:42 de 2