Displaying 20 results from an estimated 300 matches similar to: "Simple Question: adding points to a boxplot"
2002 Oct 17
1
manova with Error?
Let's say I have a within-subject experiment with 2 observables, obs1 and ob2 and 2 independent factors, fac1 and fac2.
I can do
summary( aov( obs1~fac1*fac2 + Error(Subject/(fac1*fac2)) ) )
summary( aov( obs2~fac1*fac2 + Error(Subject/(fac1*fac2)) ) )
to test the 2 observables separately.
> summary( fit<-manova( cbind(obs1,obs2)~fac1*fac2 + Error(Subject/(fac1*fac2)) ) )
gives
2007 Jul 14
1
return() in nested functions
Dear WizaRds,
After consulting different sources I am still unable to understand the
correct use of return() in nested functions. To illustrate the problem:
f <- function(x,y,type){
est1<-function(x,y){
z=x+y
out(x,y,z)}
est2<-function(x,y){
z=x*y
out(x,y,z)}
out<-function(x,y,z)
return(x,y,z)
if (type=="est1") est1(x,y)
if (type=="est2") est2(x,y)
}
2007 Mar 03
3
Help with paste()
Dear r-helpers,
Could you please tell me what's missing:
rbind(paste('txt.est',1:24, sep = ''))
txt.est1, ... txt.est24 are vectors that I wish to rbind.
_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS: P.O.Box 400400 Charlottesville, VA 22904-4400
Parcels: Room 102 Gilmer Hall
McCormick Road
2006 Apr 26
1
help using tapply
Dear R-mates,
# Here's what I am trying to do. I have a dataset like this:
id = c(rep(1,8), rep(2,8))
dur1 <- c( 17,18,19,18,24,19,24,24 )
est1 <- c( rep(1,5), rep(2,3) )
dur2 <- c(1,1,3,4,8,12,13,14)
est2 <- rep(1,8)
mydata = data.frame(id,
estat=c(est1, est2),
durat=c(dur1, dur2))
# I want to one have this:
id = c(rep(1,8), rep(2,8))
2006 Sep 27
3
Converting text to numbers
Hi,
I have Forecast Class and Observed Class in a data matrix as below.
> Sample1
FCT OBS
1 1 5
2 2 4
3 3- 3+
4 3 3
5 3+ 3-
6 4 2
7 5 1
I want to find the difference between Observed and Forecast Classes.
How can I get this done?
I tried to following to convert the 1 through 5 classes, to 1 through 7
for both OBS and FCT column.
> Sample1$OBS2 <- Sample1$OBS
2009 Aug 10
4
NotePad++ Syntax file
Does anyone have an R Syntax Highlighting file {userDefineLang.xml} for NotePad++?? I've started one, but I'm not so happy with it.
Robert Farley
Metro
1 Gateway Plaza
Mail Stop 99-23-7
Los Angeles, CA 90012-2952
Voice: (213)922-2532
Fax: (213)922-2868
www.Metro.net
[[alternative HTML version deleted]]
2009 Oct 19
2
Filtering on a dataframe- newbie question
Hi,
newbie question. I have a data-frame with 3 named columns: Name, Obs1, Obs2.
The Name column members are made of alphanumeric characters: T1, T2, T3 etc.
I would like to acess only that subset of the data-frame with Name == T44.
X <- dataframe[dataframe$Name=='T44'] does not work.
Any ideas on how to do this?
I'm sure I'm missing a simple concept here.
Thanks,
Anjan
--
2009 May 26
3
Still can't find missing data
I'm trying to prepare some cross tabs, looking at a number of variables against a variable "connector" which has 2 values: "OD Passenger" and " Connector".
When I produce a xtabs one way I have observations under "Connector" but against a different variable "Connector" shows all 0 values.
What is wrong? I've looked into the na commands
2003 Mar 05
6
Known SIP - NAT Solutions?
I have recently begun experimenting with Asterisk, and have been
mightily impressed by its capabilities and flexibility. I have run
across one problem, however, that challenges my ability to use it as a
production system.
My Asterisk box has a public Internet IP, and works great with SIP
(ATA 186) clients that also have public IP addresses. Unfortunately,
most of the locations that I would
2008 Aug 14
2
Simple (?) subset problem
I can't figure out the syntax I need to get subset to work. I'm trying
to split my dataframe into two parts. I'm sure this is a simple issue,
but I'm stumped. I either get all or none of the original "rows".
> XTTable <- xtabs( ~ direction_ , SurveyData)
> XTTable
direction_
EASTBOUND
2012 Mar 15
2
summing "transfers"
I have a dataframe from an On-Board Survey with weights ("expwgt") and variables for up to 8 used lines: VEH1 through VEH8. The lines are labeled "MT-..1" through "MT-902". I want to know how many transfers there are between MT-802 and MT-901. That is, when one of them is VEHx and the other is VEHx+1 or VEHx-1
E.g. {VEH1 = MT-802 AND VEH2 = MT-901 } plus {VEH2 =
2011 Dec 23
3
if statement problem
Hello,
I want to do fisher test for the rows in data file which has value less than
5 otherwise chi square test .The p values from both test should be stored in
one resulted file. but there is some problem with bold if statement. I don't
know how
implement this line properly.
x = cbind(obs1,obs2,exp1,exp2)
a = matrix(c(0,0,0,0), ncol=2, byrow =TRUE) #matrix with initialized
values
2008 Aug 21
2
data.frame() creates list?
I obviously don't know what I'm doing. I want to create "ByEBNum" as a
data frame, but it comes out as a list. How do I make it a data frame?
> EBNumStn <- c(673.65, 800, 1000, 1000, 800, 700, 600, 500, 400,
200, 50, 50 )
> ByEBNum <- data.frame(c(1:12),EBNumStn)
> typeof(EBNumStn)
[1] "double"
> typeof(c(1:12))
[1]
2003 Apr 08
1
T100P Incoming Calls Drop
I have been experiencing a rather odd issue with my (newly connected)
T100P card. It is installed in my Asterisk server, which is working
great with SIP clients. The card is connected to a channelized T-1 line
(24 channels). The odd bit is that outgoing calls (Asterisk --> T-1 -->
PSTN) works just fine. However, incoming calls (PSTN --> T-1 -->
Asterisk) are dropped after about 20
2008 Jun 26
1
Survey questions
First the R question. I have the results of a rather large survey
(thousands of forms, each with dozens of questions) with some existing
weights and expansion factors. I wish to add additional weighting
factors, based on new information that elements of certain variables
should appear in certain proportions. Where should I look in R to
develop what is essentially an N-dimensional balancing
2010 Jul 20
2
Constrain density to 0 at 0?
I'm plotting some trip length frequencies using the following code:
plot( density(zTestData$Distance, weights=zTestData$Actual),
xlim=c(0,10),
main="Test TLFD",
xlab="Distance",
col=6 )
lines(density(zTestData$Distance, weights=zTestData$FlatWeight), col=2)
lines(density(zTestData$Distance, weights=zTestData$BrdWeight ), col=3)
which works fine except the
2011 Jul 03
3
Hint improve my code
Hi
I have developed the code below. I am worried that the parameters I want to
be estimated are "not being found" when I ran my code. Is there a way I can
code them so that R recognize that they should be estimated.
This is the error I am getting.
> out1=optim(llik,par=start.par)
Error in pnorm(au_j, mean = b_j * R_m, sd = sigma_j) :
object 'au_j' not found
#Yet
2010 Sep 22
2
speeding up regressions using ddply
Hi,
I have a data set that I'd like to run logistic regressions on, using
ddply to speed up the computation of many models with different
combinations of variables. I would like to run regressions on every
unique two-variable combination in a portion of my data set, but I
can't quite figure out how to do using ddply. The data set looks like
this, with "status" as
2008 Oct 30
1
Trying to "expand" some data - Newbie needs help
I want to calculate "expansion factors" for elements in my dataframe
based on a 2-d cross classification. Since I'll have "missing values"
(many combinations will have no record) I'll need a second "expansion
factor" for each "row". I've included my "work to date" below, but I'm
not very close to getting this right.
My
2008 Feb 13
3
AMD64 vs i386, ifstat and bsnmp
Couple of little things I noticed with a new RELENG_7 AMD64 box (as
of yesterday)
ifstat from the ports cannot seem to find interfaces for some reason
? It works fine on i386
[ns8]# ifstat -b
ifstat: no interfaces to monitor!
[ns8]#
[ns8]# ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500