Displaying 20 results from an estimated 23 matches for "riskspan".
2010 Feb 01
5
regular expression submatch?
What is the simplest way to extract a matched subexpression?
Eg. in perl you can do
"hello world" =~ m/hello (.*)/
which would return 1(true) and set $1 to the matched subexpression "world".
--
View this message in context: http://n4.nabble.com/regular-expression-submatch-tp1459146p1459146.html
Sent from the R help mailing list archive at Nabble.com.
2009 Apr 24
4
omit empty cells in crosstab?
Perhaps this is a common question but I haven't been able to find the answer.
I have data with many factors, each taking many values. However, only
relatively few combinations appear in the data, ie have nonzero counts, in
other words the resulting table is sparse. Say we have 10 factors each with
10 levels. The result of table() would exceed the memory space (on a 32bit
machine). Is there
2009 Aug 05
7
why is 0 not an integer?
Why when I assign 0 to an element of an integer vector does the type change
to numeric?
Here is a particularly perplexing example:
> v <- 0:10
> v
[1] 0 1 2 3 4 5 6 7 8 9 10
> class(v)
[1] "integer"
> v[1] <- 0
> class(v)
[1] "numeric" #!!
>
--
View this message in context:
2009 Aug 05
7
why is 0 not an integer?
Why when I assign 0 to an element of an integer vector does the type change
to numeric?
Here is a particularly perplexing example:
> v <- 0:10
> v
[1] 0 1 2 3 4 5 6 7 8 9 10
> class(v)
[1] "integer"
> v[1] <- 0
> class(v)
[1] "numeric" #!!
>
--
View this message in context:
2009 Jul 08
2
print() to file?
I'd like to write some objects (eg arrays) to a log file. cat() flattens them
out. I'd like them formatted as in 'print' but print only writes to stdout.
Is there a simple way to achieve this result?
Thanks
--
View this message in context: http://www.nabble.com/print%28%29-to-file--tp24397445p24397445.html
Sent from the R help mailing list archive at Nabble.com.
2009 Aug 04
4
array slice notation?
Suppose I have an n-diml array A and I want to extract the first "row" -- ie
all elements A[1, ...]
Interactively if I know 'n' I can write A[1,,,,,] with (n-1) commas.
How do I do the same more generally, eg in a script?
(I can think of doing this by converting A to a vector then extracting the
approp elements then reshaping it to an array, but I wonder if there isn't a
2009 Jun 23
1
X-window graphics -- preventing window coming to front?
When I do dev.new(), the resulting window comes to the front and grabs the
focus. Is there a way to prevent this so I can continue working in other
windows while the graphics are being produced?
Thanks
--
View this message in context: http://www.nabble.com/X-window-graphics----preventing-window-coming-to-front--tp24167763p24167763.html
Sent from the R help mailing list archive at Nabble.com.
2009 Jul 01
2
sorting question
I've asked about custom sorting before and it appears that -- in terms of a
user-defined order -- it can only be done either by defining a custom class
or using various tricks with "order"
Just wondering if anyone has a clever way to order "vintages" of the form
2002, 2003H1, 2003H2, 2004, 2005Q1, 2005Q2, etc
some have H1 or H2, some have Q1,Q2,Q3,Q4, some are just plain
2010 Mar 24
0
R-help ordinal regression
...sage in context: http://n4.nabble.com/If-else-statements-tp1678705p1679530.html
> Sent from the R help mailing list archive at Nabble.com.
>
>
>
> ------------------------------
>
> Message: 55
> Date: Tue, 23 Mar 2010 11:00:17 -0800 (PST)
> From: sjaffe <sjaffe at riskspan.com>
> To: r-help at r-project.org
> Subject: [R] rpad ?
> Message-ID: <1269370817109-1679534.post at n4.nabble.com>
> Content-Type: text/plain; charset=us-ascii
>
>
> Is anyone using rpad? Is there any documentation or
> examples beyond that in
> the 'man&...
2009 Jul 09
2
How to Populate List
...you could give me some more
details about it or even if there is a book/manual that I could address
to..
Thanks a lot,
Chrysanthi.
*
*
[[alternative HTML version deleted]]
------------------------------
Message: 83
Date: Wed, 8 Jul 2009 12:03:21 -0700 (PDT)
From: Steve Jaffe <sjaffe@riskspan.com>
Subject: [R] print() to file?
To: r-help@r-project.org
Message-ID: <24397445.post@talk.nabble.com>
Content-Type: text/plain; charset=us-ascii
I'd like to write some objects (eg arrays) to a log file. cat() flattens them
out. I'd like them formatted as in 'print' but...
2009 May 05
1
self organizing map advice for categorical data
..._______________________________________________________
> D?couvrez toutes les possibilit?s de communication avec vos proches
>
> [[alternative HTML version deleted]]
------------------------------
Message: 35
Date: Mon, 4 May 2009 10:58:05 -0700 (PDT)
From: Steve Jaffe <sjaffe at riskspan.com>
Subject: [R] Cox Proportional Odds Model
To: r-help at r-project.org
Message-ID: <23373426.post at talk.nabble.com>
Content-Type: text/plain; charset=us-ascii
Is there a function, like coxph for the proportional hazard model, for
fitting a discrete-time proportional odds model?
--...
2009 Jun 04
1
how to tell if as.numeric succeeds?
Suppose I have a vector of strings. I'd like to convert this to a vector of
numbers if possible. How can I tell if it is possible?
as.numeric() will issue a warning if it fails. Do I need to trap this
warning? If so, how?
In other words, my end goal is a function that takes a vector of strings and
returns either a numeric vector or the original vector. Assuming this
doesn't already
2009 Jul 31
1
write matrix M including names(dimnames(M))
I can do this by writing (and reading) the file according to some format of
my own devising, but I'm wondering if there is a built-in way to write and
then restore a matrix with not only the dimnames (which
write.table/read.table can preserve) but also the names(dimnames)?
Example:
> M <- matrix(1:4, 2, 2)
> dimnames(M) <- list(xdim=c("a", "b"),
2010 Feb 02
3
tapply for function taking of >1 argument?
I'm sure I can put this together from the various 'apply's and split, but I
wonder if anyone has a quick incantation:
E.g. I can do tapply( data, groups, mean)
but how can I do something like: tapply( list(data,weights), groups,
weighted.mean ) ?
(or: mapply is to sapply as ? is to tapply )
Thanks for your help.
--
View this message in context:
2009 May 28
1
custom sort?
Sounds simple but haven't been able to find it in docs: is it possible to
sort a vector using a user-defined comparison function? Seems it must be,
but "sort" doesn't seem to provide that option, nor does "order" sfaics
--
View this message in context: http://www.nabble.com/custom-sort--tp23770565p23770565.html
Sent from the R help mailing list archive at Nabble.com.
2009 Sep 17
1
dyn.load search path?
Sorry if this is somewhere in the fine manuals but I've been unable to locate
it.
Does dyn.load use a search path or does it just look in the current
directory for non-fully-qualified filenames? If there is a search path, what
is it?
Thanks for your help
--
View this message in context: http://www.nabble.com/dyn.load-search-path--tp25492214p25492214.html
Sent from the R help mailing list
2010 Mar 23
2
rpad ?
Is anyone using rpad? Is there any documentation or examples beyond that in
the 'man' directory of the source?
--
View this message in context: http://n4.nabble.com/rpad-tp1679534p1679534.html
Sent from the R help mailing list archive at Nabble.com.
2011 Jul 14
1
rgl: reproduce final state of interactive plot?
After interacting with a 3d plot (eg plot3d, persp3d), is there a way to
capture the final settings of view angles, etc, so that the final plot could
be easily reproduced? The plot functions themselves just return a vector of
'ids'.
--
View this message in context: http://r.789695.n4.nabble.com/rgl-reproduce-final-state-of-interactive-plot-tp3667866p3667866.html
Sent from the R help
2009 May 28
1
custom sort?
Sounds simple but haven't been able to find it in docs: is it possible to
sort a vector using a user-defined comparison function? Seems it must be,
but "sort" doesn't seem to provide that option, nor does "order" sfaics
--
View this message in context: http://www.nabble.com/custom-sort--tp23770565p23770565.html
Sent from the R help mailing list archive at Nabble.com.
2009 Oct 08
1
R_CallMethodDef: 'type' and 'style' fields?
According to Writing R Extensions, the R_CallMethodDef struct has two
optional fields for specifying the 'type' and 'style' (where 'style' is said
to distinguish in/out/inout). But it gives no details of the possible values
of 'style'. And looking in the header file Rdynload.h the definition of
R_CallMethodDef does not include these two extra fields at all. (This is