Displaying 20 results from an estimated 2000 matches similar to: "Basic: setting resolution and size of an R graphic"
2005 Oct 23
1
Coloring leaves, twigs and labels in plot.dendrogram()
Core developers,
I couldn't find any simple way to send a vector of colors to apply to each
terminal in plot.dendrogram() or plot.hclust()---I asked R-help about it a
few weeks ago and didn't get any response---so I hacked that functionality
into the plot.dendrgram code (see below for hacked function plus
examples)....
Is there any chance this functionality could be added to the
2008 May 30
1
Reducing space around lattice wireframe plots
Dear R-help.
When plotting 3D wireframe plots with the lattice package, there is often
a lot of space between the actual plot (i.e., cube) and panel borders. For
a single wireframe, this is not a problem, but when plotting multiple
wireframes, the wasted space decreases the size of the plots very much.
Is there a way to decrease this space/margin? I could not find any
information about it in
2006 Nov 13
1
bug in lrect [lattice]?
In lattice version 0.14-11 (2006/10/23), there appears
to be a small bug in lrect [lattice]: border is set to NULL
accidentally. It is easily fixed by adding one line
to lrect -- see example and hack below ...
I wasn't sure if this should be submitted as an R bug
since it is part of a package, but a core/recommended package ...
Ben Bolker
x = runif(100)
y = runif(100)
my.lrect <-
2007 May 11
1
conditional across frames of a data fram
I'm a newbie, so please forgive me:
I have a data frame that includes two long columns of x and y coordinate
values thusly:
... ... ... x y ... ...
... ... ... 115 127 ... ...
... ... ... 120 129 ... ...
... ... ... 0 0 ... ...
... ... ... 135 162 .... ...
ect...
i need to ask R tell me how many x-y pairs contain coords that are
2012 Feb 27
1
row names of a heatmap on left hand side
Hello R Gurus,
I have a matrix for which I am doing a heatmap using heatmap.2. I want to
put the rownames on the lefthand side instead of the right side of the
heatmap. how can i put the rownames on left hand side: I have already tried
axis but could not make it work
ccc<-structure(c(1, 0.283300333755851, 0.237863231117007,
0.0148696794159253,
-0.0780756406815149, -0.106161465097659,
2008 Jul 24
1
plot.dendrogram xlim/ylim
list(...),
I would like to zoom in to the leaves of large trees in a dendrogram
plot. The playwith package allows zooming by passing xlim and ylim
arguments to the plot call (Hmisc does this too I think). But
currently stats:::plot.dendrogram does not accept xlim or ylim. So I
would like to enable that. In place of the existing code chunk:
xlim <- c(x1 - 1/2, x2 + 1/2)
ylim <- c(0,
2005 Apr 29
0
Anscombe-Glynn, Bonett-Seier, D'Agostino
Dear useRs,
I was searching CRAN for implementation of kurtosis and skewness tests,
and found that there is some kind of lack on it.
So, I have written three functions:
1. Anscombe-Glynn test for kurtosis
2. Bonett-Seier test based on Geary's kurtosis (which is not widely
known, but I was inspired by original paper describing it, found
coincidentally in Elsevier database)
3.
2008 Feb 27
2
Add a rectangle behind a plot
Hi there,
I found one reference to add a reactangle behind a
plot using plot(...,add=T), I tried this but didn't
obtain the desired result.
If a I have the following code:
plot(x,y)
rect(xleft, ybottom, xright,ytop,col='green)
The rectangle appear on top of the plot.
Any help will be greatly appreciated,
Judith
2015 Mar 13
1
[RFC PATCH v3] Intrinsics/RTCD related fixes. Mostly x86.
From: Jonathan Lennox <jonathan at vidyo.com>
* Makes ?enable-intrinsics work with clang and other non-GCC compilers
* Enables RTCD for the floating-point-mode SSE code in Celt.
* Disables use of RTCD in cases where the compiler targets an instruction set by default.
* Enables the SSE4.1 Silk optimizations that apply to the common parts of Silk when Opus is built in floating-point mode, not
2015 Mar 12
1
[RFC PATCHv2] Intrinsics/RTCD related fixes. Mostly x86.
From: Jonathan Lennox <jonathan at vidyo.com>
* Makes ?enable-intrinsics work with clang and other non-GCC compilers
* Enables RTCD for the floating-point-mode SSE code in Celt.
* Disables use of RTCD in cases where the compiler targets an instruction set by default.
* Enables the SSE4.1 Silk optimizations that apply to the common parts of Silk when Opus is built in floating-point mode, not
2012 Mar 16
2
variable values in plotmath expressions
## I would like help in using variable values in plotmath expressions
## in lattice
x <- 1:10
y <- 1:10
pval <- .95
plot(y ~ x, ## works as I want in base graphics
main=substitute(list(alpha * " = " * group("",list(p),"")),
list(p=pval)))
plot(y ~ x, ## doesn't work as intended: "pval" is displayed
main=substitute(list(alpha *
2015 Mar 12
2
[RFC PATCHv2] Intrinsics/RTCD related fixes. Mostly x86.
Nit: in dual_inner_prod_sse, why not do both horizontal sums at the same
time? As in:
xsum1 = _mm_add_ps(_mm_movelh_ps(xsum1, xsum2),
_mm_movehl_ps(xsum2, xsum1));
xsum1 = _mm_add_ps(xsum1, _mm_shuffle_ps(xsum1, xsum1, 0xf5));
_mm_store_ss(xy1, xsum1);
_mm_store_ss(xy2, _mm_movehl_ps(xsum1, xsum1));
--John
2012 Feb 27
1
How to incorporate interaction terms in MRM function of ecodist library?
Hi,
I'm interested in incorporating some interaction terms between my
explanatory variables (distance matrices in this case) when I'm using the
function MRM of the package ecodist. The function is doing a multiple
regression on distance matrices. I can get the function to work perfectly on
my explanatory matrices by adding a (+) sign as known. However, when I try
to use the (*) sign or
2006 Jul 08
2
String mathematical function to R-function
hello
I make a subroutine that give-me a (mathematical)
function in string format.
I would like transform this string into function ( R
function ).
thanks for any tips.
cleber
#e.g.
fun_String = "-100*x1 + 0*x2 + 100*x3"
fun <- function(x1,x2,x3){
return(
############
evaluation( fun_String )
############
)
True String mathematical function :-( :-(
> nomes
[1]
2020 Oct 15
0
package(moments) issue
Another bad case is
> moments::anscombe.test(rep(c(1,1.1),length=35))
Error in if (pval > 1) pval <- 2 - pval :
missing value where TRUE/FALSE needed
I haven't checked the formulas carefully, but I suspect the problem is from
taking the cube root of a negative number in
z <- (1 - 2/(9 * a) - ((1 - 2/a)/(1 + xx * sqrt(2/(a -
4))))^(1/3))/sqrt(2/(9 * a))
In R, the
2007 Feb 20
0
fix for a major format.pval limitation
'format.pval' has a major limitation in its implementation for example
suppose a person had a vector like 'a' and the error being ?0.001.
> a <- c(0.1, 0.3, 0.4, 0.5, 0.3, 0.0001)
> format.pval(a, eps=0.001)
The person wants to have the 'format.pval' output with 2 digits always
showing like this
[1] "0.10" "0.30"
2007 Mar 02
0
Patch for format.pval limitation in format.R
'format.pval' has a major limitation in its implementation for example
suppose a person had a vector like 'a' and the error being ?0.001.
> a <- c(0.1, 0.3, 0.4, 0.5, 0.3, 0.0001)
> format.pval(a, eps=0.001)
The person wants to have the 'format.pval' output with 2 digits always
showing like this
[1] "0.10" "0.30"
2008 May 08
2
applying cor.test to a (m, n) matrix
Hi everybody,
I would like to apply cor.test to a matrix with m rows and n columns and get the results in a list of matrices , one matrix for p.val, one for the statistic, one for the correlation and 2 for upper and lower confidence intervals, something analog with cor() applied to a matrix.
I have done my own function to get a matrix of p.values and i suppose i can build similar functions for
2004 Mar 09
1
bug(?) in chisq.test
This is a message for whoever maintains "chisq.test": For an
outcome more extreme than 2000 simulations, a Monte Carlo p-value of "<
2.2e-16" was printed. Ripley said the proper p-value for such cases
should be 1/(B+1) = 1/2001. This can be easily fixed by adding
"if(PVAL==0)PVAL <- 1/(B+1)" right after the following line in the code
for chisq.test (in R
2020 Oct 15
0
package(moments) issue
moments::anscombe.test(x) does give errors when x has too few values or if
all the values in x are the same
> moments::anscombe.test(c(1,2,6))
Error in if (pval > 1) pval <- 2 - pval :
missing value where TRUE/FALSE needed
> moments::anscombe.test(c(2,2,2,2,2,2,2,2))
Error in if (pval > 1) pval <- 2 - pval :
missing value where TRUE/FALSE needed
You can use tryCatch() to