Displaying 20 results from an estimated 7000 matches similar to: "Randomly remove condition-selected rows from a matrix"
2009 Jan 02
1
[Fwd: Re: [R] Randomly remove condition-selected rows from a matrix]
Following Duncan's suggestion, I forward the below to R-devel.
vQ
-------- Original Message --------
Subject: Re: [R] Randomly remove condition-selected rows from a matrix
Date: Fri, 02 Jan 2009 10:34:52 -0500
From: Duncan Murdoch <murdoch at stats.uwo.ca>
To: Wacek Kusnierczyk <Waclaw.Marcin.Kusnierczyk at idi.ntnu.no>
CC: R help <R-help at stat.math.ethz.ch>
2009 Jan 15
2
Linked count between matrix columns
Hello,
I create this array:
x <- cbind(c(1:4, rep(0,10)), c(rep(0,4), 1:2, rep(3,6), 4,5))
[,1] [,2]
[1,] 1 0
[2,] 2 0
[3,] 3 0
[4,] 4 0
[5,] 0 1
[6,] 0 2
[7,] 0 3
[8,] 0 3
[9,] 0 3
[10,] 0 3
[11,] 0 3
[12,] 0 3
[13,] 0 4
[14,] 0 5
I would like to do the following in vector syntax:
2005 May 24
2
R unable to run on Mac OS 10.4 Tiger
Hello,
I'm running a PB G4 with Mac OS 10.4.1. I have downloaded the latest
version R-2.1.0a.dmg. It appears that R does not work. It launches
itself, but the window never gets ready, there is written "Loading R..."
and a small progress wheel keeps turning indefinitely.
Could someone help or suggest something?
THANKS !!
Guillaume
2012 Jun 19
2
Smoothing a persp graph
Hi,
I'm unable to find a way to smooth data for a persp() graph.
Example, suppose that I have data x,y,z like this:
x <- 1:10
y <- 1:10
k <- 20
z <- outer(x, y, "*") + matrix( k*runif(100, -1, 1), 10, 10)
persp(x, y, z, theta = 35, phi = 25)
The graph is not very nice. Is there a way to smooth the z data so that at the end the graph would look more like something
2009 Jan 16
1
Lattice: how to have multiple wireframe nice intersection?
Hello,
This code builds a simple example of 2 wireframes :
require(lattice)
x <- c(1:10)
y <- c(1:10)
g <- expand.grid(x = 1:10, y = 1:10, gr = 1:2)
g$z <- c(as.vector(outer(x,y,"*")), rep(50,100))
wireframe(z ~ x * y, data = g, groups = gr, scales = list(arrows =
FALSE))
However, the intersection between the wireframes is not properly
drawn. Is there a way to fix this
2012 Dec 10
1
Getting the latex file from R CMD check
Hi list,
I'm running R CMD check for a package and I would like to save the .tex file that generates later the pdf documentation.
I have only seen it appearing and disappearing quickly in a tmp folder but I have not been able to save it. I could not find any option to the check command to save it.
Any idea how I can save this tex file? Thanks
Guillaume
2008 Oct 26
4
odd behaviour of identical
given what ?identical says, i find the following odd:
x = 1:10
y = 1:10
all.equal(x,y)
[1] TRUE
identical(x,y)
[1] TRUE
y[11] = 11
y = y[1:10]
all.equal(x,y)
[1] TRUE
identical(x,y)
[1] FALSE
y
[1] 1 2 3 4 5 6 7 8 9 10
length(y)
[1] 10
looks like a bug.
platform i686-pc-linux-gnu
arch i686
os linux-gnu
system
2008 Nov 17
4
functional (?) programming in r
the following is a trivialized version of some functional code i tried
to use in r:
(funcs = lapply(1:5, function(i) function() i))
# a list of no-parameter functions, each with its own closure environment,
# each supposed to return the corresponding index when applied to no
arguments
sapply(funcs, function(func) func())
# supposed to return c(1,2,3,4,5)
there is absolutely nothing unusual in
2009 May 13
3
where does the null come from?
m = matrix(1:4, 2)
apply(m, 1, cat, '\n')
# 1 2
# 3 4
# NULL
why the null?
vQ
2009 Mar 15
4
primitives again
Dear R Gurus:
How do I find the functions which are primitives, please?
Thanks,
Edna Bell
2008 Nov 30
6
Regex: workaround for variable length negative lookbehind
Hi all
I have the following regular expression problem: I want to find
complete elements of a vector that end in a repeated character but
where the repetition doesn't make up the whole word. That is, for the
vector vec:
vec<-c("aaaa", "baaa", "bbaa", "bbba", "baamm", "aa")
I would like to get
"baaa"
"bbaa"
2009 Mar 19
8
function question
Dear R Gurus:
I read somewhere that functions are considered vectors.
Is this true, please?
thanks
Edna Bell
2009 Apr 21
8
incorrect output and segfaults from sprintf with %*d (PR#13667)
Full_Name: Wacek Kusnierczyk
Version: 2.10.0 r48365
OS: Ubuntu 8.04 Linux 32bit
Submission from: (NULL) (129.241.110.141)
sprintf has a documented limit on strings included in the output using the
format '%s'. It appears that there is a limit on the length of strings included
with, e.g., the format '%d' beyond which surprising things happen (output
modified for conciseness):
2009 Mar 30
1
duplicated fails to rise correct errors (PR#13632)
Full_Name: Wacek Kusnierczyk
Version: 2.8.0 and 2.10.0 r48242
OS: Ubuntu 8.04 Linux 32 bit
Submission from: (NULL) (129.241.110.161)
In the following code:
duplicated(data.frame(), incomparables=NA)
# Error in if (!is.logical(incomparables) || incomparables)
.NotYetUsed("incomparables != FALSE") :
# missing value where TRUE/FALSE needed
the raised error is clearly not the
2009 Apr 02
2
actual argument matching does not conform to the definition (PR#13634)
Full_Name: Wacek Kusnierczyk
Version: 2.10.0 r48269
OS: Ubuntu 8.04 Linux 32 bit
Submission from: (NULL) (129.241.199.164)
In the following example (and many other cases):
quote(a=1)
# 1
the argument matching is apparently incorrect wrt. the documentation (The R
Language Definition, v 2.8.1, sec. 4.3.2, p. 23), which specifies the following
algorithm for argument matching:
1. Attempt to
2017 Jun 19
7
DRS stopped working after upgrade from debian Jessie to Stretch
Hello Samba team !
I'am in a very delicate situation. After an upgrade to debian Stretch
my DRS stopped working.
I have three DCs (fichdc, fichds01, fichds02), all Debian Stretch, all
with the same problem. Everything seems to be fine except DRS.
-> File shares works
-> DNS (with bind9 DLZ) works
-> "kinit administrator" works
-> "kinit -k FICHDC$" works
->
2017 Jun 21
4
DRS stopped working after upgrade from debian Jessie to Stretch
21.06.2017 11:45, L.P.H. van Belle via samba пишет:
> I suggest before you upgrade do a very good read here.
>
> https://wiki.samba.org/index.php/Updating_Samba#Notable_Enhancements_and_Changes
>
> https://wiki.samba.org/index.php/Samba_Features_added/changed_(by_release)
> And a summerize version for with all parameter changes as of upgrade from 4.2 up to 4.6
>
2009 Feb 25
8
learning R
I was wondering why the following doesn't work:
> a=c(1,2)
> names(a)=c("one","two")
> a
one two
1 2
>
> names(a[2])
[1] "two"
>
> names(a[2])="too"
> names(a)
[1] "one" "two"
> a
one two
1 2
I must not be understanding some basic concept here.
Why doesn't the 2nd name change to
2009 Feb 25
8
learning R
I was wondering why the following doesn't work:
> a=c(1,2)
> names(a)=c("one","two")
> a
one two
1 2
>
> names(a[2])
[1] "two"
>
> names(a[2])="too"
> names(a)
[1] "one" "two"
> a
one two
1 2
I must not be understanding some basic concept here.
Why doesn't the 2nd name change to
2017 Jun 20
2
DRS stopped working after upgrade from debian Jessie to Stretch
On Tue, 20 Jun 2017 22:31:02 +1200
Andrew Bartlett via samba <samba at lists.samba.org> wrote:
> On Tue, 2017-06-20 at 11:13 +0200, L.P.H. van Belle via samba wrote:
> > Now choose, of
> > dedicated keytab file = /etc/krb5.keytab
>
> To be clear, this parameter is not used in the AD DC.
>
> Thanks,
>
> Andrew Bartlett
>
Shouldn't that be