similar to: Remove top/right border from lattice plots

Displaying 20 results from an estimated 5000 matches similar to: "Remove top/right border from lattice plots"

2008 Nov 25
1
Strange seq() behavior
Hi, This is really strange. Can anyone help explain what's going on here (on 3 and 7)? > targets <- seq(from=.1, to=.9, by=.1) > targets[1]==.1 [1] TRUE > targets[2]==.2 [1] TRUE > targets[3]==.3 [1] FALSE > targets[4]==.4 [1] TRUE > targets[5]==.5 [1] TRUE > targets[6]==.6 [1] TRUE > targets[7]==.7 [1] FALSE > targets[8]==.8 [1] TRUE >
2009 Aug 11
1
Prevent sequential repeated values in data frame column
Hi, I'm trying to randomize a sequence of trials for an experimental design. The trials consist of values for each of two factors. As is there are 30 combinations of the two factors, and I want them to be ordered randomly but with the requirement that for one of the factors, the value can never be the same as the previous value. I'm currently randomizing my dataframe by using:
2011 Nov 09
2
plot separate groups with plotmeans()
Hi, I often use plotmeans() from the gplots package to quickly visualize a pattern of change. I would like to be able to plot separate lines for different groups, but the function gives an error when a grouping variable is included in the formula argument. For instance, > require(gplots) > x <- data.frame(Score=rnorm(100), Time=rep(1:10, 10),
2009 Mar 10
1
Nesting order for mixed models
Hello, I am confused about the order of nesting in mixed models using functions like aov(), lme(), lmer(). I have the following data: n subjects in either condition A or B each subject tested at each of 3 numerical values ("distance" = 40,50,60), repeated 4 times for each of the 3 numerical values ("trial" = 1,2,3,4) Variable summary: Condition: 2 level factor Distance:
2008 Jul 07
2
A shorter version of ".Last.value"?
Hi, There is an object, ".Last.value" to which the result of the most recent evaluation is assigned. This is similar to "ans" in Matlab. In Matlab "ans" can be very useful and time-saving, but typing the larger R version is somewhat clunky and takes away from the usefulness. Is it possible to reassign '.Last.value' to something simpler, like
2010 Apr 21
1
Adding error bars to xyplot()
Hi, I want to add error bars to a plot generated with xyplot. I've tried both errbar() and plotCI(), but in both cases the points are not in the same place. It's as if the two functions are using a different frame of reference for the plotting area. for example: means <- c(92.5, 92.25, 90.9, 91.0, 94.15, 90.05) #means time <- c(1,1,2,2,3,3) #occasion variable group <-
2010 Oct 13
4
Change global env variables from within a function
Hi, I've looked all over for a solution to this, but haven't had much look in specifying what I want to do with appropriate search terms. Thus I'm turning to R-help. In the process of trying to write a simple function to rename individual column names in a data frame, I ran into the following problem: When I rename the columns within my function, I can't seem to get it to
2008 Jul 18
1
Functions similar to step() and all.effects() that work for lme() objects?
Hello, I make frequent use of the *step()* and, for plotting, *all.effects() *functions for *lm()* objects. I am now doing more with *lme()* random effects models, and haven't been able to find functions similar to *step()* or *all.effects()* which will accept *lme()* objects. Do similar functions for either exist? If someone could point me in the right direction it would be much
2011 Sep 15
1
Problems with aggregate() function in stats package
Hi, I'm having some problems with the aggregate() function in the {stats} package, and the documentation doesn't address them. 1) Why would the first line work, but the second not? According to the help file, it accepts a "data=" argument. > with(tsrc, aggregate(x=DistRatio, by=list(Condition), FUN=mean)) Group.1 x 1 Congruent 1.741789 2 Mismatch 1.771425
2009 Dec 13
1
odfWeave produces output file that OO can't open
Dear R-helpers, I'm trying to learn how to use odfSweave. Here is my source file (in /Users/mk/myTeach/2010-1-7720/odfWeave): **************************************** Analysis of the iris Data Created on \Sexpr{date()} <<loadLibs, echo = FALSE, results = hide>>= # I usually load the libraries first so that any output produced by loading the library does not end up in the
2012 Aug 01
3
Neuralnet Error
I require some help in debugging this codeĀ  library(neuralnet) ir<-read.table(file="iris_data.txt",header=TRUE,row.names=NULL) ir1 <- data.frame(ir[1:100,2:6]) ir2 <- data.frame(ifelse(ir1$Species=="setosa",1,ifelse(ir1$Species=="versicolor",0,""))) colnames(ir2)<-("Output") ir3 <- data.frame(rbind(ir1[1:4],ir2))
2006 May 31
2
a problem 'cor' function
Hi list, One of my co-workers found this problem with 'cor' in his code and I confirm it too (see below). He's using R 2.2.1 under Win 2K and I'm using R 2.3.0 under Win XP. =========================================== > R.Version() $platform [1] "i386-pc-mingw32" $arch [1] "i386" $os [1] "mingw32" $system [1] "i386, mingw32" $status
2008 Oct 13
2
split data, but ensure each level of the factor is represented
Hello, I'll use part of the iris dataset for an example of what I want to do. > data(iris) > iris<-iris[1:10,1:4] > iris Sepal.Length Sepal.Width Petal.Length Petal.Width 1 5.1 3.5 1.4 0.2 2 4.9 3.0 1.4 0.2 3 4.7 3.2 1.3 0.2 4 4.6 3.1 1.5
2012 Jun 11
1
saving sublist lda object with save.image()
Greetings R experts, I'm having some difficulty recovering lda objects that I've saved within sublists using the save.image() function. I am running a script that exports a variety of different information as a list, included within that list is an lda object. I then take that list and create a list of that with all the different replications I've run. Unfortunately I've been
2012 Jul 31
1
kernlab kpca predict
Hi! The kernlab function kpca() mentions that new observations can be transformed by using predict. Theres also an example in the documentation, but as you can see i am getting an error there (As i do with my own data). I'm not sure whats wrong at the moment. I haven't any predict functions written by myself in the workspace either. I've tested it with using the matrix version and the
2012 Jul 10
3
fill 0-row data.frame with 1 line of NAs
Dear all Is there a simpler method to achieve the following: When I obtain an empty data.frame after subsetting, I need for it to contain one line of NAs. Here's a dummy example: > (.xb <- iris[ iris$Species=='zz', ]) [1] Sepal.Length Sepal.Width Petal.Length Petal.Width Species <0 rows> (or 0-length row.names) > dim(.xb) [1] 0 5 > (.xa <-
2008 Feb 27
2
multiple plots per page using hist and pdf
Hello, I am puzzled by the behavior of hist() when generating multiple plots per page on the pdf device. In the following example two pdf files are generated. The first results in 4 plots on one pdf page as expected. However, the second, which swaps one of the plot() calls for hist(), results in a 4 page pdf with one plot per page. How might I get the histogram with 3 other scatter
2007 Mar 22
2
unexpected behavior of trellis calls inside a user-defined function
I am making a battery of levelplots and wireframes for several fitted models. I wrote a function that takes the fitted model object as the sole argument and produces these plots. Various strange behavior ensued, but I have identified one very concrete issue (illustrated below): when my figure-drawing function includes the addition of points/lines to trellis plots, some of the
2011 Jul 28
2
not working yet: Re: lattice overlay
Hi Dieter and R community: I tried both of these three versions with ylim as suggested, none work: I am getting only single (pch = 16) not overlayed (pch =3) everytime. *vs 1* require(lattice) xyplot(Sepal.Length ~ Sepal.Width | Species , data= iris, panel= function(x, y, subscripts) { panel.xyplot(x, y, pch=16, col = "green4", ylim = c(0, 10)) panel.lmline(x, y, lty=4, col =
2010 Jun 09
4
question about "mean"
Hi there: I have a question about generating mean value of a data.frame. Take iris data for example, if I have a data.frame looking like the following: --------------------- Sepal.Length Sepal.Width Petal.Length Petal.Width Species 1 5.1 3.5 1.4 0.2 setosa 2 4.9 3.0 1.4 0.2