Displaying 20 results from an estimated 40000 matches similar to: "Combining tables"
2009 Jul 27
3
Working with tables with missing levels
Hello
I'm trying to write a function to calculate the relative entropy between
two distributions. The data I have is in table format, for example:
> t1 <- prop.table(table(c(0,0,2,4,4)))
> t2 <- prop.table(table(c(0,2,2,2,3)))
> t1
0 2 4
0.4 0.2 0.4
> t2
0 2 3
0.2 0.6 0.2
The relative entropy is given by
H[P||Q] = sum(p * log2(p/q))
with the
2006 Nov 02
3
Better y-axis labels, and x-axis scaling
Hello
I'm plotting some data using matplot with a logarithmic scale on the
y-axis. This is the call to matplot I'm using:
matplot(turns, distances, type = "l", log = "y", lty = "solid",
ylab = "", xlab = "Time steps", col = c("black"))
The values for the 'distances' vector are always between 0 and 1.
The
2010 Apr 23
4
basic table statistics
Hi,
I have a very simple question, but I'm obviously not able to solve the
problem on my own.
I have a data.frame like
sample(c("A","B","C"),size=20,replace = T)->type
rnorm(20)->value
data.frame(ty=type,val=value)->test
There must be some built in functions, that will do some descriptive
statistics with tabular output, in the end I like to have
2010 Jun 02
1
lattice, xyplot, using "panel.segments" by just addressing one panel
Hi R experts,
I'm using the xyplot function in lattice to draw a multipanel plot consiting
of 5x6 scatterplots.
Now I need to link single points in each of those scatterplots (=panel),but
the points, that need linking are different for each panel.
I tried to use the panel.segments function for that, but I can't address
each panel separately. Links right for panel 1, show up in all other
2006 Oct 13
2
Multiple barplots on the same axis
Hi
R newbie here :)
I need to plot 3 barplots in the same axis, something like
|
| _ _ _
| | | _ | | _ | | _
| _ | || | _ | || | _ | || |
| | || || | | || || | | || || |
-+-----------------------------------------
| v1 v2 v3
Is there any documentation describing how to achieve that, and
2008 Nov 06
2
Incrementally building histograms
Hello
I need to build a histogram from data (numbers in the [0,1] interval)
stored in a number of different files. The total amount of data is very
large, so I can't load everything to memory and then simply call hist().
Since what I actually need are the histogram counts, I'm currently doing
it like this:
breaks <- seq(0, 1, by = 0.01)
files <- list.files(pattern = "some
2011 Mar 16
2
Error: write(auth socket) failed: Broken pipe
Hello
>From time to time I'm seeing errors like this in my logs:
Mar 16 10:45:55 box5 dovecot: lmtp(5438): Error: write(auth socket)
failed: Broken pipe
This causes delivery from postfix to fail until I restart dovecot.
There doesn't seem to be any other messages in the logs related to this
error. Has anyone ever seen this error?
Thanks
Andre
2011 Jun 16
2
Polygon question
Hi all,
I have the following script which fills the values which are less than
the mean of a given timeseries.
If you look closely, the colored regions are "out of line".
Any suggestions how I can rectify this?
Thanks
Muhammad
# -----
#rm(list=ls())
x <- abs(rnorm(100))
tt <- 1:100
m <- mean(x)
w <- which(x>=m)
x1 <- x ; x2 <- x ; x3 <- x
x1[w] <- m
2008 Feb 26
4
"Raw" histogram plots
Hello
I need to plot a histogram, but insted of using bars, I'd like to plot
the data points. I've been doing it like this so far:
h <- hist(x, plot = F)
plot(y = x$counts / sum(x$counts),
x = x$breaks[2:length(x$breaks)],
type = "p", log = "xy")
Sometimes I want to have a look at the "raw" data (avoiding any kind of
binning). When x
2008 Mar 19
2
Multiple plots question
Hello
I have a number of different data sets, each loaded as a matrix. I'd
like to plot them in a way that the data in the first column of each
matrix is plotted on the same pair of axes.
What I'm doing now is to call plot() for the data on the first matrix,
then call points() for the other ones. However, the axes are set by R
according to the data passed to plot(), and sometimes the
2013 Mar 05
1
different colors for two wireframe spheres
Dear List,
I have the code below adapted from the lattice-package examples to draw two spheres. I would now like to give
both different surface colors, e.g. one red and one blue.
## 3-D surface parametrized on a 2-D grid
n <- 10
tx <- matrix(seq(-pi, pi, length.out = 2*n), 2*n, n)
ty <- matrix(seq(-pi, pi, length.out = n) / 2, 2*n, n, byrow = T)
xx <-
2010 Oct 21
2
Segfault in libdovecot-sieve
Hello,
I've been getting these messages in dmesg:
[1663649.206652] lmtp[4961]: segfault at 18 ip 00007fb5b6aab1f0 sp00007fff7e3b5468 error 4 in libdovecot-sieve.so.0.0.0[7fb5b6a6d000
+66000]
Dovecot's version is 2.0.3. Is this known? What other kind of information could be useful to help find this issue?
Thanks,Andre
2000 Oct 06
4
R: plotting values on graphics
Everyone,
I have an array of integer values which are located on a uniform 2-D grid. I want to plot the integer values at the node locations. The closest I have come is with the following code:
for (i in 1:ny) {
for (j in 1:nx) {
ncell <- nx*(i - 1) + j
ch <- as.character(ncount[ncell])
tx <- j*dx - dx/2
ty <- ny*dy - (i-1)*dy - dy/2
points(tx, ty, pch = ch, col =
2009 Jul 06
1
how to apply a self-written function to a data frame
Hello,
I have written a function in order to analyse gaze paths. It works with the test data but when I try to apply the function to a data frame that stores "the real data" in columns I receive the error message that the
" In if (pp > 1) { :
condition has length > 1 only the first element will be used
"
I interpret this error message as saying that only the first
2009 May 19
2
[LLVMdev] llvm-java
Nicolas Geoffray wrote:
> Hi Andre?
>
> Andre Tavares wrote:
>
>> Thanks for all answers. I will consider them all before I start coding.
>>
>> I have another discussion that I would like to hear from you.
>>
>> I can implement SSI in two different ways. Analysis or Transformation Pass.
>>
>> As an Analysis Pass, I would create a SSI
2015 May 24
2
[LLVMdev] Callgraph inaccuracy
Hello,
I am trying to extract a callgraph using DSA, but the analysis looks quite
pessimistic. I use TDD analysis and here is my test code:
#include <stdlib.h>
typedef void (*tX)(int a, int b);
typedef void (*tY)(int a);
typedef struct {
tX p ;
int n;
} msg;
static void A1(int a) { }
static void B2(int a, int b) { }
static void C2(int a, int b) { }
tY q;
static void decode(tX
2006 Jul 29
1
fancier plotting
Hi
thank you for talking the time to help me with this.
I have a sequence of numbers in a file and an equal sequence of various character, say(a b c d) each occurs more than once. I need to plot the numbers so that numbers corresponding to a in the other sequence would have green dots, those corresponding to b a red dot, nothing on c and blue square for d. i.e
2 a show a green dot
4 b show a
2013 May 10
0
[LLVMdev] Predicated Vector Operations
On May 10, 2013, at 11:53 AM, dag at cray.com wrote:
> Jeff Bush <jeffbush001 at gmail.com> writes:
>
>> Ah, I think I get it now. This was mentioned earlier in the thread,
>> but it didn't click at the time. It sounds like I can do instruction
>> selection with a pattern like (omitting selection of the sources):
>>
>> let Constraints = "$dst
2014 Aug 20
2
[LLVMdev] LLVM CreateStructGEP type assert error
Sure, it is the Rodinia 2.4 Hotspot benchmark OpenCL kernel (not my kernel), with the addition of my struct as the last argument in the kernel function.
//------- kernel file start -------------------------------
#define BLOCK_SIZE 16
//dlowell's type
#define BUFFER_LEN 0x100000
typedef struct RB{
unsigned int x;
unsigned int y;
int z[BUFFER_LEN];
unsigned int xx[BUFFER_LEN];
2015 May 28
0
[LLVMdev] Callgraph inaccuracy
I'm working on this issue, thank you for reporting it.
The short answer is that the callgraph reported by TD is the same as
discovered/computed during BU
(and BU can't determine the indirect call can only target C2).
I've added this example, and a few other related tests, to the DSA's
test suite[1] to document
this behavior while I'm working out what the best solution is.