Displaying 20 results from an estimated 7000 matches similar to: "R newbie: logical subsets"
2005 Apr 07
2
axis colors in pairs plot
The following command produces red axis line in a pairs
plot:
pairs(iris[1:4], main = "Anderson's Iris Data -- 3 species",
pch = "+", col = c("red", "green3", "blue")[unclass(iris$Species)])
Trying to fool pairs in the following way produces the
same plot as above:
pairs(iris[1:4], main = "Anderson's Iris Data -- 3
2005 Jul 08
3
pairs() uses col argument for axes coloring
Hi list,
not sure if this is the wanted behavior, but running the following code:
> version
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 2
minor 1.1
year 2005
month 06
day 20
language R
> n <- 500
> d <- 4
> m <- matrix(runif(n*d, -1, 1), ncol=d)
> c <- hsv(apply(m, 1, function(x) {sum(x*x)/d}),
2005 Jul 08
3
pairs() uses col argument for axes coloring
Hi list,
not sure if this is the wanted behavior, but running the following code:
> version
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 2
minor 1.1
year 2005
month 06
day 20
language R
> n <- 500
> d <- 4
> m <- matrix(runif(n*d, -1, 1), ncol=d)
> c <- hsv(apply(m, 1, function(x) {sum(x*x)/d}),
2011 Jun 09
2
[PATCH] Btrfs: turn to readonly if btrfs_start_transaction() fails
When btrfs_start_transaction() fails, we should call btrfs_std_error()
properly for filesystem to readonly.
(in this patch, forced readonly framework is used)
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
---
fs/btrfs/file.c | 1 +
fs/btrfs/inode.c | 34 +++++++++++++++++++++++++++-------
fs/btrfs/ioctl.c | 11 ++++++++++-
fs/btrfs/relocation.c | 4 +++-
2013 Jan 01
3
translate grouped data to their centroid
Given a data set with a group factor, I want to translate the numeric
variables to their
centroid, by subtracting out the group means (adding back the grand means).
The following gives what I want, but there must be an easier way using
sweep or
apply or some such.
iris2 <- iris[,c(1,2,5)]
means <- colMeans(iris2[,1:2])
pooled <- lm(cbind(Sepal.Length, Sepal.Width) ~ Species,
2017 Dec 04
1
[nbdkit PATCH] nbd: Fix sporadic use-after-free
Now that we properly clean up 'trans' in the reader thread, we
must not dereference 'trans' from the write thread at any point
after trans has been added to the list unless we have grabbed
it back off the list ourselves, or we risk an occasional
use-after-free or even double free that valgrind can detect.
Reported-by: Richard W.M. Jones <rjones@redhat.com>
Fixes:
2013 Jun 27
1
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
On Thu, Jun 27, 2013 at 04:00:01PM +0800, Asias He wrote:
> This module contains the common code and header files for the following
> virtio-vsock and virtio-vhost kernel modules.
>
> Signed-off-by: Asias He <asias at redhat.com>
> ---
> include/linux/virtio_vsock.h | 200 +++++++
> include/uapi/linux/virtio_ids.h | 1 +
>
2013 Jun 27
1
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
On Thu, Jun 27, 2013 at 04:00:01PM +0800, Asias He wrote:
> This module contains the common code and header files for the following
> virtio-vsock and virtio-vhost kernel modules.
>
> Signed-off-by: Asias He <asias at redhat.com>
> ---
> include/linux/virtio_vsock.h | 200 +++++++
> include/uapi/linux/virtio_ids.h | 1 +
>
2008 Sep 02
2
cluster a distance(analogue)-object using agnes(cluster)
I try to perform a clustering using an existing dissimilarity matrix that I
calculated using distance (analogue)
I tried two different things. One of them worked and one not and I don`t
understand why.
Here the code:
not working example
library(cluster)
library(analogue)
iris2<-as.data.frame(iris)
str(iris2)
'data.frame': 150 obs. of 5 variables:
$ Sepal.Length: num 5.1 4.9 4.7
2019 May 25
1
[nbdkit PATCH] nbd: Rewrite thread passing to use semaphore rather than pipe
I ran some local testing on my Fedora 29 system via:
$ ./nbdkit memory 1m
$ for i in `seq 10`; do
./nbdkit -U - --filter=stats nbd \
statsappend=true statsfile=$file hostname=localhost port=10809 \
--run '~/libnbd/examples/threaded-reads-and-writes $unixsocket'
done
Pre-patch, the runs averaged 1.266s, 1.30E+08 bits/s
Post-patch, the runs averaged 1.154s, 1.42E+08
2010 Sep 21
5
removed data is still there!
I'm confused, hope someone can point out what is not obvious to me.
I thought I was creating a new data frame by 'deleting' rows from an
existing dataframe - I've tried 2 methods.
But this new data frame seems to remember values from its parent - even
though there are no occurences.
Where does it get the values versicolor and virginica from and give then a
count of 0?
What
2004 Jun 07
1
Xtable giving an interesting problem
I'm using the current version of xtable for 1.9.0 and I have an
interesting error:
Error in match.names(clabs, names(xi)) : names don't match previous
names:
F value, Pr(>F)
In addition: Warning message:
longer object length
is not a multiple of shorter object length in: clabs == nmi
This is produced in the following manner:
>data.trans <-
2013 Mar 04
2
[PATCH 1/2] Btrfs: fix wrong handle at error path of create_snapshot() when the commit fails
There are several bugs at error path of create_snapshot() when the
transaction commitment failed.
- access the freed transaction handler. At the end of the
transaction commitment, the transaction handler was freed, so we
should not access it after the transaction commitment.
- we were not aware of the error which happened during the snapshot
creation if we submitted a async transaction
2012 Jan 05
4
[RFC][PATCH 3/3] Btrfs: improve truncation of btrfs
The original truncation of btrfs has a bug, that is the orphan item will not be
dropped when the truncation fails. This bug will trigger BUG() when unlink that
truncated file. And besides that, if the user does pre-allocation for the file
which is truncated unsuccessfully, after re-mount(umount-mount, not -o remount),
the pre-allocated extent will be dropped.
This patch modified the relative
2009 Feb 12
2
barplot() x axes are not updated after removal of categories from the dataframe
Hi all,
I'd be grateful for your help. I am a new user struggling with a barplot
issue.
I am plotting categories (X axis) and their mean count (Y axies) with
barplot().
The first call to barplot works fine.
I remove records from the dataframe using final=[!final$varname == "some
value",]
I echo the dataframe and the records are no longer in the dataframe.
When I call plot again
2008 Jul 30
3
[LLVMdev] llvm-gcc fortran bootstrap broken
On x86-64 linux, in stage 2, I get:
c++ -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -fno-common -DHAVE_CONFIG_H -o f951 \
fortran/arith.o fortran/array.o fortran/bbt.o fortran/check.o fortran/data.o fortran/decl.o
2009 May 07
1
data transformation using gamma
Hi R-users,
I have this code to uniformise the data using gamma:
> length(dp1)
[1] 696
> dim(dp1)
[1] 58 12
> dim(ahall)
[1] 1 12
> dim(bhall)
[1] 1 12
> trans_dt <- function(dt,a,b)
+ { n1 <- ncol(dt)
+ n2 <- length(dt)
+ trans <- vector(mode='numeric', length=n2)
+ dim(trans) <- dim(dt)
+ for (i in 1:n1)
+ { dt[,i] <- as.vector(dt[,i])
2010 Apr 04
1
[LLVMdev] _gt_ggc_r_gt_darwin_c_h undefined
While attempting to build llvm-gcc-4.2 from llvm-2.7 release
branch, I am finding that the build fails at...
c++ -g -O2 -mdynamic-no-pic -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -mdynamic-no-pic -DHAVE_CONFIG_H -o f951 \
fortran/arith.o
2012 Sep 06
2
[PATCH V4 01/12] Btrfs: fix error path in create_pending_snapshot()
This patch fixes the following problem:
- If we failed to deal with the delayed dir items, we should abort transaction,
just as its comment said. Fix it.
- If root reference or root back reference insertion failed, we should
abort transaction. Fix it.
- Fix the double free problem of pending->inherit.
- Do not restore the trans->rsv if we doesn''t change it.
- make the error path
2010 Mar 20
2
[PATCH 4/4] btrfs-convert: split into convert/.
No material changes are made.
---
Makefile | 10 +-
convert.c => convert/convert.c | 803 +---------------------------------------
convert/convert.h | 76 ++++
convert/ext2.c | 791 +++++++++++++++++++++++++++++++++++++++
4 files changed, 873 insertions(+), 807 deletions(-)
rename convert.c => convert/convert.c (74%)
create mode