search for: waclaw

Displaying 20 results from an estimated 42 matches for "waclaw".

Did you mean: alaw
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> References: <79CAFBDD-4BB8-4C9D-A0E9-54E280458510 at gmail.com> <8b356f880812300920o19d18aeo47dc31f087c3f36 at mail.gmail.com> <DA6ECC19-C786-4C02-B246-4B613726BC7F at gmail.com> <8b356f88081...
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 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"
2008 Jun 20
5
Programming Concepts and Philosophy
I am wondering if people on the list could recommend books that they have found helpful about programming concepts and style? I often find that students write R programs by copying existing code but could really benefit from the understanding of more general programming ideas. An example would be to avoid writing functions which attempt to modify their parameters. Another principle would be
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):
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
2009 Feb 04
1
reference for ginv
?ginv provides 'Modern Applied Statistics with S' (MASS), 3rd, by Venables and Ripley as the sole reference. I happen to have this book (4th ed) on loan from our library, and as far as I can see, ginv is mentioned there twice, and it is *used*, not *explained* in any way. (It is used on p. 148 in the 4th edition.) ginv does not appear in the index of MASS. ginv is an implementation of
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 Jan 18
8
regex -> negate a word
Dear all, let's assume I have a vector of character strings: x <- c("abcdef", "defabc", "qwerty") What I would like to find is the following: all elements where the word 'abc' does not appear (i.e. 3 in this case of 'x'). Since I am not really experienced with regular expressions, I started slowly and thought I find all word were
2009 Feb 23
1
are arithmetic comparison operators binary?
the man page for relational operators (see, e.g., ?'<') says: " Binary operators which allow the comparison of values in atomic vectors. Arguments: x, y: atomic vectors, symbols, calls, or other objects for which methods have been written. " it is somewhat surprizing that the following works: '<'(1) # logical(0) '<'() #
2009 Feb 23
1
are arithmetic comparison operators binary?
the man page for relational operators (see, e.g., ?'<') says: " Binary operators which allow the comparison of values in atomic vectors. Arguments: x, y: atomic vectors, symbols, calls, or other objects for which methods have been written. " it is somewhat surprizing that the following works: '<'(1) # logical(0) '<'() #
2009 Apr 25
0
incorrect output and segfaults from sprintf with %*d (PR#13675)
On Fri, Apr 24, 2009 at 14:40, Wacek Kusnierczyk <Waclaw.Marcin.Kusnierczyk at idi.ntnu.no> wrote: > maechler at stat.math.ethz.ch wrote: >> >> =A0 =A0 vQ> sprintf has a documented limit on strings included in the ou= tput using the >> =A0 =A0 vQ> format '%s'. =A0It appears that there is a limit on the leng= th of st...
2009 May 14
1
Simulation)
I wrote As a beginner, I agree .... the for loop is much clearer to me. Wacek Kusnierczyk <Waclaw.Marcin.Kusnierczyk at idi.ntnu.no> replied > >well, that's quite likely. especially given that typical courses in >programming, afaik, include for looping but not necessarily functional >stuff -- are you an r beginner, or a programming beginner? > Both. My PhD is in psych...
2009 Mar 20
1
sprintf causes a segfault (PR#13613)
Full_Name: Wacek Kusnierczyk Version: 2.8.0 and 2.10.0 r48163 OS: Ubuntu 8.04 Linux 32bit Submission from: (NULL) (129.241.198.172) the following code illustrates a problem with sprintf which consistently causes a segfault when applied to certain type of arguments. it also shows inconsistent consequences of the segfault: (e = tryCatch(stop(), error=identity)) # e is an error object
2009 Mar 09
3
E`<`<rrors in recursive default argument references
Tested in: R version 2.8.1 (2008-12-22) / Windows Recursive default argument references normally give nice clear errors. In the first set of examples, you get the error: Error in ... : promise already under evaluation: recursive default argument reference or earlier problems? (function(a = a) a ) () (function(a = a) c(a) ) () (function(a = a) a[1] ) () (function(a = a)
2008 Jun 18
1
strsplit and the empty string
Hello, I am wondering about the behaviour of strsplit. When the pattern matches the beginning of the search string, the mepty string is added to the result, but that's not the case when the pattern matches the end of the search string: strsplit(" hello dolly ") [1] "" "hello" "dolly" The man for strsplit explains the algorithm: " The algorithm
2009 Mar 23
1
incoherent treatment of NULL
somewhat related to a previous discussion [1] on how 'names<-' would sometimes modify its argument in place, and sometimes produce a modified copy without changing the original, here's another example of how it becomes visible to the user when r makes or doesn't make a copy of an object: x = NULL dput(x) # NULL class(x) = 'integer' # error: invalid
2009 May 13
11
Simulation
Dear R users, Can anyone please tell me how to generate a large number of samples in R, given certain distribution and size. For example, if I want to generate 1000 samples of size n=100, with a N(0,1) distribution, how should I proceed? (Since I dont want to do "rnorm(100,0,1)" in R for 1000 times) Thanks for help Debbie