Displaying 9 results from an estimated 9 matches for "xtb".
Did you mean:
xbt
2009 Nov 22
3
Define return values of a function
I have created a function to do something:
i <- factor(sample(c("A", "B", "C", NA), 793, rep=T, prob=c(8, 7, 5,
1)))
k <- factor(sample(c("X", "Y", "Z", NA), 793, rep=T, prob=c(12, 7, 9,
1)))
mytable <- function(x){
xtb <- x
btx <- x
# do more with x, not relevant here
cat("The table has been created, see here:\n")
print(xtb)
list(table=xtb, elbat=btx)
}
tbl <- table(i, k)
mytable(tbl) # (1)
z <- mytable(tbl) # (2)
str(z) # (3)
(1) Wanted: outputs the string and the table prop...
2024 Feb 27
1
Interactions in regression
...tor(rep(rep(c("Control","Treatment"),each=100),2))
mu <- rep(rep(1:2,each=100),2)
response <- rnorm(400,mean=mu)
xmpldata <- data.frame(time=time,treatment=treatment,response)
mod <- lm(response~time*treatment,data=xmpldata)
yhat <- fitted(mod)
xtb <- with(xmpldata,xtabs(yhat ~ time+treatment))
print(xtb)
> treatment
> time Control Treatment
> Post 94.10501 201.99112
> Pre 101.63792 210.04248
Is that (something like) what you want?
cheers,
Rolf Turner
P.S. You said: "I usually use GUI software&...
2024 Feb 28
1
Interactions in regression
...ot;,"Treatment"),each=100),2))
> mu <- rep(rep(1:2,each=100),2)
> response <- rnorm(400,mean=mu)
> xmpldata <- data.frame(time=time,treatment=treatment,response)
> mod <- lm(response~time*treatment,data=xmpldata)
> yhat <- fitted(mod)
> xtb <- with(xmpldata,xtabs(yhat ~ time+treatment))
>
> print(xtb)
>
> > treatment
> > time Control Treatment
> > Post 94.10501 201.99112
> > Pre 101.63792 210.04248
>
> Is that (something like) what you want?
>
> cheers,
>
> Ro...
2011 Jul 27
3
Reorganize(stack data) a dataframe inducing names
Dear Contributors,
thanks for collaboration.
I am trying to reorganize data frame, that looks like this:
n1.Index Date PX_LAST n2.Index Date.1 PX_LAST.1
n3.Index Date.2 PX_LAST.2
1 NA 04/02/07 1.34 NA 04/02/07 1.36
NA 04/02/07 1.33
2 NA 04/09/07 1.34 NA 04/09/07
2024 Feb 25
1
Interactions in regression
Hi,
I do not want to make a plot, I try to make an output table in R, (in GUI
like Stata this is trivially easy task)
with regard to SO OP question. As I mentioned, in paper I would not do
this, but out of curiosity I use R this time trying to create it.
If in R this is trivial task as well, could you please show how to do it ?
After googling a lot I did not find solution.
regards,
Jacek
niedz.,
2010 Dec 07
4
Creating binary variable depending on strings of two dataframes
Hi,
consider the following two dataframes:
x1=c("232","3454","3455","342","13")
x2=c("1","1","1","0","0")
data1=data.frame(x1,x2)
y1=c("232","232","3454","3454","3455","342","13","13","13","13")
2009 Nov 23
0
R-help Digest, Vol 81, Issue 23
...o do something:
>
> i <- factor(sample(c("A", "B", "C", NA), 793, rep=T, prob=c(8, 7, 5,
> 1)))
> k <- factor(sample(c("X", "Y", "Z", NA), 793, rep=T, prob=c(12, 7, 9,
> 1)))
> mytable <- function(x){
> xtb <- x
> btx <- x
> # do more with x, not relevant here
> cat("The table has been created, see here:\n")
> print(xtb)
> list(table=xtb, elbat=btx)
> }
> tbl <- table(i, k)
> mytable(tbl) # (1)
> z <- mytable(tbl) # (2)
> str(z) # (3)...
2011 Apr 02
8
ZFS @ centOS
I have trouble finding definitive information about this. I am considering
the use of SME 7.5.1 (centOS based) for my server needs, but I do want to
use ZFS and I thus far I have only found information about the ZFS-Fuse
implementation and unclear hints that there is another way. Phoronix
reported that http://kqinfotech.com/ would release some form of ZFS for the
kernel but I have found nothing.
2012 Sep 13
6
[newbie] aggregating table() results and simplifying code with loop
Dear all,
I'm looking for primary help at aggregating table() results and at
writing a loop (if useful)
My dataset ( http://goo.gl/gEPKW ) is composed of 23k rows, each one
representing a point in the space of which we know the land cover over
10 years (column y01 to y10).
I need to analyse it with a temporal sliding window of 5 years (y01 to
y05, y02 to y06 and so forth)
For each period