Displaying 20 results from an estimated 7000 matches similar to: "processing log file"
2007 Jul 16
3
looking at a function's code
Good morning,
I'd like to look at the code for the R function head. When I type just the word head, I get back
function(x, ...)
UseMethod("head")
<environment: namespace:utils>
I expected to see several lines of R code. Any suggestions?
Thanks,
Walt Paczkowski
2007 Aug 10
3
having problems with factor()
Dear R Help,
I have a set of data of heights of trees described by area that they are in. The areas are numerical (0 to 7).
ht area
1 320 3
2 410 4
3 230 2
4 360 3
5 126 1
6 280 2
7 260 2
8 280 2
9 280 2
10 260 2
.......
180 450 4
181 90 1
182 120 1
183 440 4
184 210 2
185 330 3
186 210 2
187 100 1
188 0 0
I want to convert the
2011 Dec 01
1
Fw: calculate mean of multiple rows in a data frame
NAME
ID
a
b
c
d
1
Control_1
probe~B01R01C01
381
213
345
653
2
Control_2
probe~B01R01C02
574
629
563
783
3
Control_1
probe~B01R09C01
673
511
521
967
4
Control_3
probe~B01R09C02
53
809
999
50
5
MM0289~RFU:11810.15
probe~B29R13C06
681
34
115
587
6
MM0289~RFU:9238.41
probe~B29R13C05
784
443
20
784
7
MM16597~RFU:36765.38
probe~B44R15C20
719
251
790
445
8
MM16597~RFU:41258.94
probe~B44R15C19
677
2011 Nov 24
2
how to add "waiting for page change" to my script
I'd like to "step" through 24 histograms by using the return or click button option, as shown in the demo(graphics) demonstration. I've searched for "interactive graphics", and "waiting for page change" in R documentation but with no result. I'm sure that this is a relatively straightforward procedure. Can anyone point me to the correct solution?
Jabez
2009 Nov 25
1
Re-arrange Columns in data frame
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20091125/789611db/attachment-0001.pl>
2007 Aug 13
2
question regarding is.factor()
Dear all, please help with what must be a straightforward question which I can't answer.
I add a column of my dataframe as factor of an existing column e.g.
df[,5] <- factor(df[,2])
and can test that it is by is.factor()
but if I did not know in advance what "types" the columns were, is there a function to tell me what they are.
i.e. instead of
2013 Feb 08
3
Border width on symbols plotted with the lattice package
Dear list members,
I can't figure out how get 'xyplot' or 'dotplot' in the 'lattice'
package to respect the 'lwd' value for specifying the border with for
*symbols* (for lines it works fine). Example:
-----
# Base graphics works fine (gives a 'fat? circle)
plot(5, cex=10, pch=21, lwd=10)
# But 'xyplot' or 'dotplot' doesn't
2009 Oct 05
2
Long for Loop- calling C from R - Parallel Computing
Hello everyone,
I'm running the following for loop to generate random variables in chunks of
60 at a time (l), here h is of order in millions (could be 5 to 6 millions),
note that generating all the variables at once could have an impact on the
final results
for(j in 1:h){
dat$t.o[seq(0,g1,l)[j]+1:l]<-dat$mu[seq(0,g1,l)[j]+1:l] +
rnorm(l,0,dat$g.var[seq(0,g1,l)[j]+1:l])
}
Is there any
2009 Oct 19
2
Possible bug in plot.POSIXct regarding x axis
I believe I have found a bug (or at least a misfeature) in plot.POSIXct.
See the following example code.
set.seed(1)
x=seq(1,1e8,length=100)+round(runif(100)*1e8)
y=as.POSIXct(x,origin="2001-01-01")
plot(y)
This plots some random (date)times against their indices. The y axis
correctly shows appropriate values (years), but the x axis contains the
single number '59:58' in the
2011 Feb 02
3
Applying multiple functions to one object
Dear list members,
I recall seeing a convenience function for applying multiple functions to
one object (i.e., almost the opposite of 'mapply?) somewhere.
Example: If the function was named ?fun? the output of
fun(3.14, mode, typeof, class)
would be identical to the output of
c(mode(3.14), typeof(3.14), class(3.14))
Is my memory failing me, or does such a function already exists in a
2008 Apr 22
2
Getting rid of borders on semi-transparent plotting symbols
R version 2.7.0 RC (2008-04-20 r45403)
When using semi-transparent filled plotting symbols, the border of the
symbol has a different (darker) colour than the interior:
plot(0, 0, pch=19, col="#FF000022")
(Saving this as a PDF and looking at it magnified may make it easier to
see.)
This is pretty annoying, since when plotting partially overlapping
points, the border colour dominates,
2009 Mar 20
2
Accuracy of R and other platforms
Hi,
The paper
@ARTICLE{AlmironSilvaMM:2009,
author = {Almiron, M. and Almeida, E. S. and Miranda, M.},
title = {The Reliability of Statistical Functions in Four Software Packages
Freely used in Numerical Computation},
journal = {Brazilian Journal of Probability and Statistics},
year = {in press},
volume = {Special Issue on Statistical Image and Signal Processing},
url =
2009 Oct 30
2
data.frame extracting data row-wise
Dear All,
I am struggling with extracting data from a data frame:
x=data.frame(a=1:11,b=100:110)
What I want is a list/vector in this sence: 1 100 2 101 3 102...
For single rows, this works fine:
as.matrix(x)[1,]
For, say 2 rows, this works fine:
z=c(as.matrix(x)[1,],as.matrix(x)[2,])
But
z=c(as.matrix(x)[1:2,])
gives 1 2 100 101!?
Is there an 'automated way' to produce a
2007 Jul 13
1
Choosing the number of colour breaks in ggplot2
A seemingly simple problem has me stumped. Is it possible to choose the
number of colour breaks for a gradient scale in the current version of
ggplot2?
Here is a simple example:
---------------------------------------------
x=-10:10
y=-10:10
dat=expand.grid(x=x,y=y)
dat$z=dat$x^2+dat$y^2-100
ggplot(dat, mapping=aes(x=x, y=y, fill=z)) +
geom_tile() + scale_fill_gradient2()
2009 Dec 10
3
How to figure out which the version of split is used?
There are a number of functions that are dispatched to from split().
> methods('split')
[1] split.data.frame split.Date split.default split.POSIXct
Is there a way to figure out which of these variants is actually
dispatched to when I call split? I know that if the argument is of the
type data.frame, split.data.frame will be called? Is it the case that
if the argument is not
2007 Jul 16
2
Different axis limits for each facet in ggplot2
Hi!
Is it possible to have different axis limit for each facet in a ggplot2
plot? Here is an example:
--------------------------------------------------------------
library(ggplot2)
x=seq(-10,10,.1)
y=cos(x)
z=sin(x)*10
dat=melt(data.frame(x,y,z), id.var="x")
qplot( x, value, data=dat, facets=variable~., geom="line" )
2009 Oct 30
1
Applying a function on n nearest neighbours
I'm having a problem where I have to apply a function to a subset of a
variable, where the subset is defined by the n nearest neighbours of a
second variable.
Here's an example applied to the 'iris' dataset:
$ head(iris)
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
2009 Nov 25
1
Kerning issues with CairoPDF
Dear list members
I'm using CairoPDF to generate PDF (because of its font embedding and
support for transparent colours). However, at least on my (Windows)
system, the text it outputs seems to have completely wrong kerning.
Here's an example:
CairoPDF("test.pdf")
plot(rnorm(100),xlab="Ovreset")
dev.off()
The v is (slightly) too far away from the O, it's much
2006 Sep 12
1
lattice cloud and conditional axis limits
I'm using the 'cloud' function in the 'lattice' package to produce
multi-panel 3D scatter plots. The range of the values used vary much
between each panel (especially on the z axis), so I wish the axis limits
to be calculated based on the (conditional) data.
Here's a minimal example:
library(lattice)
z=1:200
x=runif(200)
y=runif(200)
s=factor(rep(c(1,2),each=100))
2008 Apr 15
1
Text-based graphics/plots
When discussing statistics in e-mail based discussion groups, or in
newsgroups, it is sometimes useful to include simple, text-based
statistical graphics. Here is an example, a histogram (only useful
with a fixed-width font, obviously).
:.....
..:::::::::.
.:::::::::::::::