Displaying 20 results from an estimated 61 matches for "ex2".
Did you mean:
0x2
2009 Nov 08
2
Simple 2-Way Anova issue in R
Hello, I'm new to R and have been following many guides including the two-way
anova (http://www.personality-project.org/r/r.anova.html). Using that
walkthrough including the supplied data I do str(data.ex2) and receive the
appropriate types of data as follows:
> str(data.ex2)
'data.frame': 16 obs. of 4 variables:
$ Observation: int 1 2 3 4 5 6 7 8 9 10 ...
$ Gender : Factor w/ 2 levels "f","m": 2 2 2 2 2 2 2 2 1 1 ...
$ Dosage : Factor w/ 2 levels "a...
2011 Mar 01
1
Problem on flexmix when trying to apply signature developed in one model to a new sample
...R Users, R Core Team,
I have a problem when trying to know the
classification of the tested cases using two variables with the function of flexmix:
After importing the database and creating
a matrix:
BM<-cbind(Data$var1,Data$var2)
I see that the best model has 2 groups and
use:
ex2
<- flexmix(BM~1, k=2, model=FLXMCmvnorm(diagonal=FALSE))
print(ex2)
plotEll(ex2, BM)
Then I want to test to which group one
subset of patients belongs, so I import a smaller sample of the previous data:
BM2<-data.frame (Data2$var1,Data2$var2)
However when I test the results I get a...
1997 Nov 03
1
R-alpha: expression(..) objects -- c(ex1, ex2) `fails'
...'', IMHO.
We can have expressions of length(.) > 1, and access elements of these like
list elements.
However, other natural things don't work with expressions; some example code:
##-- `Simple' length--1 expressions:
ex1 <- expression(hat(beta) == (X^t * X)^{-1} * X^t * y)
ex2 <- expression(bar(x) == sum(over(x[i], n), i==1, n))
ex3 <- expression(paste(over(1, sigma*sqrt(2*pi)), " ",
plain(e)^{over(-(x-mu)^2, 2*sigma^2)}))
##-- A length--2 expression:
ex12 <- expression(bar(x) == sum(over(x[i], n), i==1, n),
hat(x) == median(x[i], i==1,n)...
2011 Jan 12
1
how to change strip text of effect plot
Dear r heper,
How can I change the strip text, for example (16,23] in the following
example, to other more informative text such as "high level" on the
fly?
library(effects)
Cowles$ex2 <- cut(Cowles$extraversion,3)
mod.cowles <- glm(volunteer ~ sex+neuroticism*ex2,data=Cowles, family=binomial)
eff.cowles <- allEffects(mod.cowles)
plot(eff.cowles, 'neuroticism:ex2',factor.names=F)
Thank you.
Ronggui
--
Wincent Ronggui HUANG (Ph.D.)
City University of Hong Kon...
2010 May 10
1
how to get p-value from ave
...he p-value is small.
but I want to put aov in my script. how can I get the p-value, (0.1115, 0.6665, 0.6665 in the following example)?
thanks
YU
> datafilename="http://personality-project.org/r/datasets/R.appendix2.data"
> data.example2=read.table(datafilename,header=T)
> aov.ex2 = aov(Alertness~Gender*Dosage,data=data.example2)
> summary(aov.ex2)
Df Sum Sq Mean Sq F value Pr(>F)
Gender 1 76.562 76.562 2.9518 0.1115
Dosage 1 5.062 5.062 0.1952 0.6665
Gender:Dosage 1 0.063 0.063 0.0024 0.6665
Residuals 12 311.250 25.9...
2012 Jan 18
2
Table Intersection
I've got two tables....
first one(table1):
ID chrom start end
Ex1 2 152 180
Ex2 10 2000 2220
Ex3 15 3000 4000
second one ( table2):
chrom location name
2 160 Alv
2 190 GNN
2 100 ARg
10 210...
2018 Feb 15
1
RV: Problem_graphic
...this graphic or similar but instead of tropical and temperate are three ontogenetic states
Larva Met Juv
CTMAX
CTMIN
SP SP SP
This is my scrip:
Ex = subset(Expr, Outlayer=="N")
Ex2 = subset (Ex, S0 == 1)
Ex3 = subset(Ex2, Experimento == "CTMIN")
Ex4 = subset(Ex2, Experimento == "CTMAX")
Ex3$Stage <- ordered(Ex3$Stage, levels=c("LARVA", "MET", "JUV"))
Ex4$Stage <- ordered(Ex4$Stage, levels=c("LARVA", "MET&q...
2007 Jan 04
1
problem with function 'optimise' (PR#9438)
...d value of the maximum is 0.309017 which is definitely wrong.
Example 2:
The next function has also two equivalent maxima this time not located at the
margins of the interval [0, 9/41]. Thus, the maxima are real analytic extrema.
The function 'optimise()' again returns a wrong value.
ex2 <- function(x) log((18/41) * x - 2 * x^2) + 16 * log(4 * x^2 - (36/41) * x
+ (9/41)) + 24 * log((23/82) + (18/41) * x - 2 * x^2)
opt2 <- optimise(ex2, lower=0, upper=(9/41), maximum=T)
x <- seq(0,9/41,0.001)
plot(x,ex2(x),type="l")
abline(v=opt2$maximum, col="red")...
2004 Jul 12
1
Nested source()s
I had an error message while running a macro from Yudi Pawitan's web site:
> source("ex2-13.r")
Error in parse(file, n, text, prompt) : syntax error on line 2
Inspecting ex2-13.r I found that the error was generated by another
source() command.
Clearly R does not like nested source()s, which is fair enough when you
think about it. Still it's something that you might want t...
2012 Jun 06
0
heatmap.2 clustering and adding add.expr
Hi ,
I am trying to plot a heatmap with a correlation matrix and trying to
highlight significant correlations .
i am using
my matrix d874n has 78 columns
ex2<-corAndPvalue(data.matrix(d874n),use = "pairwise.complete.obs")
##creating a matrix of true false using p values
sig<-ex2$p<0.05
nx=78
ny=78
makeRects <- function(tfMat,border){
cAbove = expand.grid(1:nx,1:ny)[tfMat,]
xl=cAbove[,1]-0.49
yb=cAbove[,2]-0.49
xr=cAbove[,1]...
2011 Feb 22
1
odfWeave graphics glitch
...4.5
setImageDefs(imageDefs)
X11(type="cairo")
plot(x,y)
title(main="sin(cos(x/pi))")
savePlot("sincosx.png")
@
This is embedded in file example02in.odt, which has very little else.
In R I run
library(odfWeave)
infile<-"example02in.odt"
outfile<-"ex2.odt"
odfWeave(infile,outfile)
I get the png file created, but the ex2.odt is "corrupted" according to OpenOffice.
On automatic fixup, it does have a frame for a graph, but this is labelled "Read Error".
Note that the vignette for odfWeave has a blank graph too. I've e...
2011 Sep 09
4
reshape data from long to wide format
This is my reproducible example:
example<-structure(list(SENSOR = structure(1:6, .Label = c("A", "B", "C",
"D", "E", "F"), class = "factor"), VALUE = c(270, 292.5, 0, 45,
247.5, 315), DATE = structure(1:6, .Label = c(" 01/01/2010 1",
" 01/01/2010 2", " 01/01/2010 3", " 01/01/2010
2006 Nov 12
1
[PATCH] Annotate shapes, text and dbus support
...tic void
+annoDrawCircle (CompScreen *s, double xc, double yc, double radius,
+ unsigned short *fillColor, unsigned short *strokeColor,
+ double strokeWidth)
+{
+ REGION reg;
+ cairo_t *cr;
+
+ ANNO_SCREEN (s);
+
+ cr = annoCairoContext (s);
+
+ if (cr)
+ {
+
+ double ex1, ey1, ex2, ey2;
+ cairo_set_source_rgba (cr,
+ (double) fillColor[0] / 0xffff,
+ (double) fillColor[1] / 0xffff,
+ (double) fillColor[2] / 0xffff,
+ (double) fillColor[3] / 0xffff);
+ cairo_arc (cr, xc, yc, radius, 0, 2*M_PI);
+ cairo_fill_preserve (cr);
+ cairo_set_line_w...
2010 Oct 13
1
bwplot change whiskers position to percentile 5 and P95
...is the code:
library(lattice)
ex <- data.frame(v1 = log(abs(rt(180, 3)) + 1),
v2 = rep(c("2007", "2006", "2005"), 60),
z = rep(c("a", "b", "c", "d", "e", "f"), e = 30))
ex2 <- data.frame(v1b = log(abs(rt(18, 3)) + 1),
v2 = rep(c("2007", "2006", "2005"), 6),
z = rep(c("a", "b", "c", "d", "e", "f"), e = 3))
ex3 <- merge(ex, ex2, by=c("v...
2000 Apr 28
0
Problems setting up Samba (nmbd) as multi-subnet router
Hi,
i have a network with one machine acting as master router with
2x4-Port-Ethernet-Cards in it - running nmbd!
There are two Windows-Workgroups, WRK1 and WRK2 in each there are
Windows-Exchange-Servers EX1, EX2. In WRK2 the PDC is on EX2, in WRK1 there
is a standalone PDC, PDC1.
Every network is a full 255 IP-Network.
192.168.40.1 WRK1 EX1 (192.168.40.40) PDC1 (192.168.40.42)
192.168.41.1 WRK1 Other Servers
192.168.42.1 WRK2 EX2/PDC2 (192.168.42.40) Clients
192.168.43.1 WRK1 Other Servers
192.168.44...
2009 Feb 20
2
why doesn't table() have a data=argument?
...s are to be found. In the
examples in \secref{sec:table} I used \code{attach(mydata)} for this
purpose,
but \codefun{attach} leaves the variables in the global environment,
while \codefun{with} just evaluates the \codefun{table} expression in a
temporary environment of the data.
}
<<convert-ex2,results=verbatim>>=
Art.tab <-with(Arthritis, table(Treatment, Sex, Improved))
str(Art.tab)
ftable(Art.tab)
@
--
Michael Friendly Email: friendly AT yorku DOT ca
Professor, Psychology Dept.
York University Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street http:...
2008 Oct 06
0
Computing on the language redux
...stitute(), and that
substitute() could be used directly, but it was somewhat tricky. For
completeness, I just wanted to show the substitute construction, which
actually doesn't seem all that tricky to me. Here is the complete code
sequence to check:
ex1 <- expression(x < a) ## original
ex2 <- bquote( .(ex1[[1]]) & y < b) ## Using bquote
ex3 <- substitute( z & y < b,list(z = ex1[[1]])) ## using substitute
directly
identical(ex2,ex3) ## TRUE
Cheers to all,
Bert Gunter
Genentech Nonclinical Statistics
2010 Sep 27
1
bwplot superpose panel.points from another dataframe
...e)
ex <- data.frame(v1 = log(abs(rt(180, 3)) + 1),
v2 = rep(c("2007", "2006", "2005"), 60),
z = rep(c("a", "b", "c", "d", "e", "f"), e = 30))
# the individual to be marked
ex2 <- data.frame(v1b = log(abs(rt(18, 3)) + 1),
v2 = rep(c("2007", "2006", "2005"), 6),
z = rep(c("a", "b", "c", "d", "e", "f"), e = 3))
ex3 <- merge(ex, ex2, by=c("v...
2001 Jan 09
1
FW: Question
> I'm trying to load Samba 2.0.7 on an HP-UX version 10.20 operating system.
> The hardware is a Visualize B180L with a 9GB Ultra SCSI disk drive
> attached. During the configuration I get the following error message:
> ERROR: No locking available. Running Samba would be unsafe
> Configure: error: summary failure - Aborting Config.
>
> When I look in the configuration
2009 Feb 24
1
R parser for If-else
...work.
As far as i'm concerned, no examples were available (it would be so
awesome to have them in the introductory manual!)
#Try to change the placement of the keywords and you are dead! 4 examples
Ex1:
if (1==1){
?print('if')
?print('if again')
?}else
?print('else')
Ex2:
if (2==2) print('if') else print('else')
Ex3:
if (2==2){
?print('if')
?print('if again')
?}else
?{
?print('else')
?print('else2')
?}
Ex4:
if (2==2){
?print('if')
?print('if again')
}else print('else')
cheers,
------------...