Displaying 20 results from an estimated 10000 matches similar to: "Artifacts in pdf() of image() (w/o comments)"
2007 Aug 11
1
Artifacts in pdf() of image()
Dear r-helpers,
I have two questions:
(1) The following produces a pdf with artifacts. How do I prevent them?
require(grDevices)
imSize <- 200
lambda <- 10
theta <- 15
sigma <- 40
x <- 1:imSize
x0 <- x / imSize -.5
freq = imSize/lambda # compute frequency from
wavelength
xf = x0 * freq * 2 * pi # convert X to radians: 0 ->
( 2*pi *
2005 Aug 27
2
Defining an ex-gaussian PDF
How does one define PDFs as yet undefined in R, such as the ex-
gaussian, the sum of two RVs, one exponential, one Gaussian? The PDF
would then be the convolution of an exponential PDF, dexp(), and a
normal, dnorm().
Kindly cc me in your reply to r-help.
Thanks,
_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS: P.O.Box 400400
2006 Oct 15
4
Hide line ends behind unfilled circles?
Dear r-helpers,
xx <- c(0.000, 0.210, 0.714, 0.514, 1.000, 0.190, 0.590, 0.152)
yy <- c(0.000, 0.265, 0.256, 0.521, 0.538, 0.761, 0.821, 1.000)
aa <- c(19, 19, 19, 21, 19, 21, 21, 21)
x0 <- xx[c(1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 6, 6, 7)]
y0 <- yy[c(1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 6, 6, 7)]
x1 <- xx[c(2, 3, 3, 4, 6, 4, 5, 5, 6, 7, 7, 7, 8, 8)]
y1 <- yy[c(2, 3, 3, 4, 6, 4, 5,
2007 Mar 17
1
Font in JavaGD() & pdf()
Dear r-helpers,
When I do an xYplot and display the result in a JavaGD() window, the
font is sans-serif (presumably Helvetica). When I send the figure to
a pdf, I get a serif font (presumably times). How do I insure that
the font in the pdf is indeed the default sans serif?
> sessionInfo()
R version 2.4.1 (2006-12-18)
i386-apple-darwin8.8.1
locale:
C
attached base packages:
[1]
2007 Aug 10
1
rfImpute
I am having trouble with the rfImpute function in the randomForest package.
Here is a sample...
clunk.roughfix<-na.roughfix(clunk)
>
> clunk.impute<-rfImpute(CONVERT~.,data=clunk)
ntree OOB 1 2
300: 26.80% 3.83% 85.37%
ntree OOB 1 2
300: 18.56% 5.74% 51.22%
Error in randomForest.default(xf, y, ntree = ntree, ..., do.trace = ntree,
:
NA not
2008 Feb 10
2
grep etc.
Dear R-helpers,
How do I transform
v <- c('insd-otsd', 'sppr-unsp')
into
c('insd--otsd', 'sppr--unsp')
?
_____________________________
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 Charlottesville, VA 22903
2008 Apr 17
2
Conditionally swap items in a data frame
df1 <- data.frame(a = LETTERS[1:2], b = LETTERS[3:4], c = 1:2)
I am looking for an idiom that swaps the elements of df$a and df$b
when (e.g.) df$c == 2, resulting in
df2 <- data.frame(a = LETTERS[c(1, 4)], b = LETTERS[c(3, 2)], c = 1:2)
_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS: P.O.Box 400400 Charlottesville, VA
2007 Jan 28
2
Adding lines to xYplot
I am using xYplot to plot data and CIs. How do I add several lines to
the figure?
_____________________________
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 Charlottesville, VA 22903
Office: B011 +1-434-982-4729
Lab: B019
2006 Dec 19
2
Problem with glmmADMB
library(glmmADMB)
#Example for glmm.admb
data(epil2)
glmm.admb(y~Base*trt+Age
+Visit,random=~Visit,group="subject",data=epil2,family="nbinom")
Gives:
Error in glmm.admb(y ~ Base * trt + Age + Visit, random = ~Visit,
group = "subject", :
The function maximizer failed
******************
R version 2.4.1 RC (2006-12-14 r40181)
powerpc-apple-darwin8.8.0
locale:
C
2006 Mar 06
1
JGR doesn't launch after updating to R 2.2.1
Dear r-helpers,
After updating to R version 2.2.1, 2005-12-20, powerpc-apple-
darwin7.9.0 (from binary), JGR wouldn't launch. I then deleted
everything I could find related to JGR, and reinstalled it from the
latest binary. Both R and JGR are installed in /Applications/
\~LocalApps/mathStat/.
Advice on how to identify the source of the problem?
My machine:
Machine Name:
2008 Oct 06
1
Color of title in legend()
Dear R-helpers,
This produces a red title. How do I make it black, without making the
labels black?
legend(title = 'Channel Integration', 0.7, 0.3,
c('loudness','luminance'), col = c('red', 'blue'), text.col = c('red',
'blue'), lty = 1, xjust = 0.5, bty = 'n')
_____________________________
Professor Michael Kubovy
University
2006 Apr 14
1
Dotplot x-axis
Here's a small dataset:
type <- c('hierarchical','partial','single','complete','single
+hierarchical','single+partial','partial+hierarchical','single+partial
+hierarchical')
freq <- c(1455,729,688,65,29,28,16,17)
lodds <- log(freq/(3027 - freq))
dotplot(type~lodds)
I would like to have the x-axis have ticks at nice,
2005 Feb 05
2
Problem installing Hmisc
What am I doing wrong?
> install.packages("Hmisc")
trying URL `http://cran.r-project.org/src/contrib/PACKAGES'
Content type `text/plain; charset=iso-8859-1' length 47565 bytes
opened URL
==================================================
downloaded 46Kb
trying URL `http://cran.r-project.org/src/contrib/Hmisc_3.0-1.tar.gz'
Content type `application/x-tar' length
2007 Apr 10
2
Positioning in xyplot
Dear R-helpers,
I have an xyplot
of the following kind:
xYplot(y ~ x | p, groups = factor(gg, levels = c('1', '5', '2', '4',
'3')),
strip = strip.custom(var.name = 'g', factor.levels = c(1', '5', '2',
'4', '3'),
strip.levels = T, strip.names = T, sep = ' = ', shingle.intervals =
NULL),
data =
2008 Jan 28
2
Package simex
Dear R-helpers,
It is not clear to me how you get measurement.error SD when you have a
single dataset, and it is not clear to me how sensitive SIMEX is to
errors in the estimates of measurement error.
Could someone please point me to the relevant literature?
_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS: P.O.Box 400400
2009 Sep 06
5
ggplot2::qplot() -- arbitary transformations of coordinate system?
Hi,
Does anyone know how to do a coord_trans() in which the y-axis is
tranformed into (for example) -1000/y?
Thanks,
_____________________________
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 Charlottesville, VA 22903
Office: B011
2007 Oct 31
2
mosaic row and column order
Dear R-helpers,
I wasn't able to find out how to override the alphabetical ordering
of the rows and columns in a vcd::mosaic plot. I would like to have
them each ordered by numerical values in a different column of the
data frame that contains the contingency data.
I would be most grateful for a pointer toward the solution.
Thanks,
MK
_____________________________
Professor Michael
2010 Aug 31
1
odfWeave
Dear -r-helpers,
I'm trying to get my students to use odfWeave. Windows users are having
trouble. I would appreciate advice.
Comment 1:
Hello I have spent a while today trying to get odfWeave to be successful I
installed the unzip and zip program but it has not changed the error message.I
have copied the error message below but I am sure it is the one others have
experienced.
>
2008 Jan 02
1
Random Bernoulli sequences with given point-biserial correlation?
Dear R-listers,
Can someone suggest a method for generating a finite Bernoulli
sequence that is likely to have a given point-biserial correlation
with an existing Bernoulli sequence?
_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS: P.O.Box 400400 Charlottesville, VA 22904-4400
Parcels: Room 102 Gilmer Hall
2007 Apr 26
1
xyplot() and controlling panel.polygon()
Dear R-helpers,
How do I tell panel.polygon what greoup and panel it applies to whithin
xyplot(y ~ x | c, groups = g
panel = function(x, y, groups, ...){
panel.polygon(x = xpol[c, g], y = ypol[c, g], default.units
= 'native')
panel.xYplot(x, y, groups, ...)
llines(x = c(1, 6), y = c(-24.283333, 35.941667), lwd = 2, lty =
3, col = 4)
}
x[c, g] and y[c, g] describe