Displaying 20 results from an estimated 11000 matches similar to: "Error Building R + X11 on SuSe 10S"
2018 Jul 26
2
Possible To Enable Building R With Cairo But Without X11 Dependencies?
Hello,
So the Homebrew community dropped support for --with-cairo which is a shame
because --without-x --with-cairo is an important combination for any
environment that might need to generate graphics without X11 (or related)
dependencies (macOS, headless linux servers).
This rejected GitHub PR contains more detail:
https://github.com/Homebrew/homebrew-core/pull/24094
(See also these comments:
2008 Nov 24
4
Calculating sum of letter values
Hi all
If I have a string, say "ABCDA", and I want to convert this to the sum of the letter values, e.g.
A -> 1
B -> 2
etc, so "ABCDA" = 1+2+3+4+1 = 11
Is there an elegant way to do this? Trying something like
which(LETTERS %in% unlist(strsplit("ABCDA", "")))
is not quite correct, as it does not count repeated characters. I guess what I need is
2008 Nov 25
3
Line color based on data values?
Hi all
Does anyone know if it is possible when plotting a line or scatter plot, to selectively color the data points based on the data value? i.e. if plotting say the percentage change in stock price movements, to color +ve points in green and -ve points in red? And extending this to a user-defined range of colors based on the quartile of the data points?
Thanks
Rory
Rory Winston
RBS Global
2008 Dec 05
1
Cartesian Product Of Character Vectors
Hi all
(I'm sure this question has been asked before, but I cant find it).
If I have two character vectors:
> x <- c("aaa","bbb","ccc")
> y <- c("1","2","3")
How can I get the cartesian product of the string values?
> expand.grid(x,y)
Gives me a data frame with separate columns...however, I cant seem to get *apply
2008 Apr 04
4
Arbitrary Precision Numbers
Hi
(If you're wondering, this is a Project Euler question :))
If I wanted to calculate the sum of the digits in the decimal representation
of 2^1000, what would be a good way to go about that? I've tried the
following methods:
# Calculate the sum of digits in the decimal representation of 2^n
# Only works for smaller values of n
bsum <- function(n) {
s <- 0
e <-
2008 Jun 08
2
Adding a Rotated Density Plot to an Existing Plot
Hi
Consider the following graph:
x <- rnorm(1000)
x <- x + exp(-x/2)
layout(matrix(rep(c(1,1,2), 2), 2, 3, byrow=TRUE))
boxplot(x)
rug(jitter(x), side=2)
plot(density(x))
What I would really like to do is to have the density plot rotated by 90
degrees so that I can see it line up with the rug plot on the side axis.
I cant seem to do this. I have seen references to the grid
2008 Dec 05
1
Lexical Permutation Algorithm in R
Hi all
Here is a rather naive implementation of the SEPA algorithm for generating lexical permutations:
lexperm3 <- function(x, n=length(x)) {
perms <- list()
k <- 1
perms[[k]] <- x
k <- k + 1
for (y in 1:(factorial(n)-1)) {
i <- n-1
while (x[i] > x[i+1] && i > 0) {
i <- i - 1
}
# i is largest index st x[i] > x[i+1]
j <- n
#
2008 Dec 26
2
Computational Probability
Hi
Firstly , happy Christmas to R-Help! Secondly, I wonder if anyone can help
me with the following query: I am trying to reproduce some explicit
probability calculations performed in APPL (a Maple extension for
computational probability). For instance, in APPL, to compute the
probability that the sum of 10 iid uniform variables [0,1] will be between 4
and 6, (i..e Pr( 4 < \sum_{i=1}^{10}X_i
2009 Jul 03
2
Correlation Network Diagram?
Hi all
On page 39 of this paper [1] by Andrew Lo there is a very interesting
correlation network diagram (sorry I dont have a more convenient link to
the type of diagram I'm talking about). does anyone know of any package in
R that can generate these types of diagrams?
Cheers
-- Rory
[1] http://web.mit.edu/alo/www/Papers/august07.pdf
[[alternative HTML version deleted]]
2008 Apr 12
3
Matrix Indexing
Hi
Does anyone know how I might pick out diagonal elements of a matrix using a
vector?
If I create a matrix a:
a <- matrix(c(1:16), 4, byrow=TRUE)
and I want to pick out the elements (1,1),(2,2),(3,3), or another arbitrary
diagonal (upper or lower), is there any way I can use a vector to do this?
So if I want a diagonal of size 3, I could create a vector like x <- c(0:2)
and then pick
2008 Jul 03
2
Plotting Prediction Surface with persp()
Hi all
I have a question about correct usage of persp(). I have a simple neural
net-based XOR example, as follows:
library(nnet)
xor.data <- data.frame(cbind(expand.grid(c(0,1),c(0,1)), c(0,1,1,0)))
names(xor.data) <- c("x","y","o")
xor.nn <- nnet(o ~ x + y, data=xor.data, linout=FALSE, size=1)
# Create an (x.y) surface and predict over all points
d <-
2007 Sep 03
2
Derivative of a Function Expression
Hi
I am currently (for pedagogical purposes) writing a simple numerical
analysis library in R. I have come unstuck when writing a simple
Newton-Raphson implementation, that looks like this:
f <- function(x) { 2*cos(x)^2 + 3*sin(x) + 0.5 }
root <- newton(f, tol=0.0001, N=20, a=1)
My issue is calculating the symbolic derivative of f() inside the newton()
function. I cant seem to get R to
2007 Oct 29
2
Changing size of lattice plot?
Hi
I am having a bit of difficulty with changing the canvas size on a
trellis/lattice plot. I am plotting two "cubes" of 3-dimensional random
numbers, as follows:
library(gsl)
library(lattice)
q <- qrng_alloc(type="sobol", 3)
npoints <- 200
rs <- qrng_get(q,npoints)
# Plot the normal variates in a 3-dim cube
p1 <- cloud(rnorm(npoints) ~ rnorm(npoints) +
2009 Jul 03
3
Computing Time Intervals On A Series
Hi
I have a dataset that looks like this (dput'd below):
> head(x, 20)
time status
1 2009-07-02 10:32:37 1
2 2009-07-02 10:32:43 0
3 2009-07-02 10:32:43 1
4 2009-07-02 10:32:44 0
5 2009-07-02 10:32:44 1
6 2009-07-02 10:32:48 0
7 2009-07-02 10:32:48 1
8 2009-07-02 10:32:54 0
9 2009-07-02 10:33:04 1
10 2009-07-02 10:33:04 0
11 2009-07-02 10:33:05 1
12 2009-07-02 10:33:07 0
13 2009-07-02
2020 Aug 23
2
sum() vs cumsum() implicit type coercion
Hi
I noticed a small inconsistency when using sum() vs cumsum()
I have a char-based series
> tryjpy$long
[1] "0.0022" "-0.0002" "-0.0149" "-0.0023" "-0.0342" "-0.0245" "-0.0022"
[8] "0.0003" "-0.0001" "-0.0004" "-0.0036" "-0.001" "-0.0011"
2009 Jun 23
5
Merging Irregular Time Series With NAs
Hi
I have two irregular time series, which are of different lengths and being
and end at different times. For the common subset of time that they both
span, they should have the same values, but the values may occur at
slightly different time intervals. I am trying to "line up" the identical
values and reconcile them. I have merged the two series into a zoo object
which looks
2008 Apr 05
2
Adding a Matrix Exponentiation Operator
Hi all
I recently started to write a matrix exponentiation operator for R (by
adding a new operator definition to names.c, and adding the following code
to arrays.c). It is not finished yet, but I would like to solicit some
comments, as there are a few areas of R's internals that I am still feeling
my way around.
Firstly:
1) Would there be interest in adding a new operator %^% that performs
2011 May 16
3
Is it time to re-factor yet :^)
Or how to avoid the whirlwind.
Greetings everyone.
I observe the coding of lighdm is well under way and I'm thinking the
pressure to meet the releases of 11.11 is probably going to build without
bounds.
Is there time now to consider the inclusion of some of the more offbeat use
cases?
1: Headless(no monitor, keyboard, or monitor)
2: True headless(no video card) but Xvfb.
3: No X but only
2008 Sep 02
1
Moving to a new bug reporting system?
Hi all
This may be an issue that has been discussed at length before, so apologies if I have missed that discussion, but is there any desire to switch from Jitterbug to something more capable and modern? Say JIRA, for instance?
Rory
Rory Winston
RBS Global Banking & Markets
Office: +44 20 7085 4476
***********************************************************************************
The
2012 Jun 04
1
X11 font error on headless server running Xvfb
I am trying to run an R script to create a .png file containing a tree map on a headless Linux server using Xvfb. When I try to run tmPlot, I get the following errors and warnings:
Error in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 1 at size 9 could not be loaded
Calls: tmPlot ... <Anonymous> ->