Hello,
I have two questions regarding a survival analysis I have been
working on. Below is the code to date.
The variables:
1) recidivism$intDaysUntilFVPO are the number of days before an
violent offence was committed - if no offence was committed than the
days between court hearing and
Hi all,
I thought this should be very simple, but I'm not sure where the
problem is. I have a .txt data file that contains X and Y coordinates
of trees and their family names:
X Y Mark
0 28 Sapotaceae
1 30 Meliaceae
1 40 Meliaceae
1 60 Mimosaceae
Sorry to bother everyone---I realized I should have used == instead
of = in the subset syntax!
Quoting Ophelia Wang [EMAIL PROTECTED]:
Hi all,
I thought this should be very simple, but I'm not sure where the
problem is. I have a .txt data file that contains X and Y coordinates
of trees and
Tom Backer Johnsen [EMAIL PROTECTED] [Fri, Nov 28, 2008 at 10:13:04PM CET]:
Hans W. Borchers wrote:
[...]
Please answer to my e-mail address. In case enough interesting material comes
up, I will enter a summary here.
It is nice that you are willing to summarize whatever appears, but
I have two vectors, a and b. b is a text file. I want to find in b those
elements of a which occur at the beginning of the line in b. I have the
following code, but it only returns a value for the first value in a, but I
want both. Any ideas please.
a = c(2,3)
b = NULL
b[1] = aaa 2 aaa
b[2] =
Try this:
a - 2:3
b - c(aaa 2 aaa, 2 aaa, 3 aaa, aaa 3 aaa)
re - paste(^(, paste(a, collapse = |), ), sep = )
re
[1] ^(2|3)
grep(re, b, value = TRUE)
[1] 2 aaa 3 aaa
On Sat, Nov 29, 2008 at 7:00 AM, ppaarrkk [EMAIL PROTECTED] wrote:
I have two vectors, a and b. b is a text file. I want
Tom Backer Johnsen backer at psych.uib.no writes:
[...]
The question is interesting, but what I have a somewhat negative
reaction to is the next passage:
Please answer to my e-mail address. In case enough interesting material
comes up, I will enter a summary here.
It is nice that
You need
Yut_are - subset (Yut, Mark==Arecaceae, select=c(X, Y, Mark))
for equality test (two ==)
On Sat, Nov 29, 2008 at 5:22 AM, Ophelia Wang
[EMAIL PROTECTED] wrote:
Hi all,
I thought this should be very simple, but I'm not sure where the
problem is. I have a .txt data file that contains
Hi there,
I hope to use a string as an input in my function, however, I don't want
to input the quotation mark. Is it possible?
Thanks in advance.
Regards,
Jinsong
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
Hello R users,
I have successfully created a square (or more generally, rectangular) tophat
smoothing routine based on altering the already available KDE2D. I would be
keen to implement a circular tophat routine also, however this appears to be
much more difficult to write efficiently (I have a
Hi there,
I hope to use a string as an input in my function, however, I don't want
to input the quotation mark. Is it possible?
Thanks in advance.
Regards,
Jinsong
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
This works if you type it in from the R console:
s - readline()
this is my string
s
[1] this is my string
On Sat, Nov 29, 2008 at 9:41 AM, Jinsong Zhao [EMAIL PROTECTED] wrote:
Hi there,
I hope to use a string as an input in my function, however, I don't want
to input the quotation
has anyone had problems with the upgrade to R 2.8 and chron date
classes. I have a large zoo object that has a chron index, and it is
taking 5x or so longer to do the same calculation as with 2.7 if it
doesn't fail. I will provide anything necessary I am not entirely
sure what ya'll would need
Are you using the same version of chron both times?
On Sat, Nov 29, 2008 at 10:05 AM, stephen sefick [EMAIL PROTECTED] wrote:
has anyone had problems with the upgrade to R 2.8 and chron date
classes. I have a large zoo object that has a chron index, and it is
taking 5x or so longer to do the
On Fri, Nov 28, 2008 at 4:13 PM, Tom Backer Johnsen [EMAIL PROTECTED]wrote:
Hans W. Borchers wrote:
...The question is interesting, but what I have a somewhat negative reaction
to is the next passage:
Please answer to my e-mail address. In case enough interesting material
comes up, I will
Hmm, this brings up an interesting question. What if the string I'm looking
for contains escape characters? For example, grep( paste( ^, (ab) ),
c(ab,(ab)) ) = c(1), not c(2).
I couldn't find an equivalent to Emacs's regexp-quote, which would let me
write regexp.quote((ab)) = \\(ab\\). The
tedzzx zengzhenxing at gmail.com writes:
Hi, all
I am facing an optimization problem. I am using the function optim(par,fun),
but I find that every time I give different original guess parameter, I can
get different result. For example
I have a data frame named data:
head(data)
Hello Thomas (and all),
Zitat von Thomas Petzoldt [EMAIL PROTECTED]:
Oliver Bandel wrote:
Hello,
at some places I read about good interaction of
LaTeX and R.
Can you give me a starting point, where I can find
information about it?
Are there special LaTeX-packages for the
grep has a fixed = TRUE argument if you want to ignore all regexp's.
On Sat, Nov 29, 2008 at 3:55 PM, Stavros Macrakis [EMAIL PROTECTED] wrote:
Hmm, this brings up an interesting question. What if the string I'm looking
for contains escape characters? For example, grep( paste( ^, (ab) ),
Dear R buddies,
This weekend I became interested in solving Google Code Jam problems
using R. I guess R may work very well in this kind of contests but the
input of file has been a problem for me. Take this case for example
Dear R gurus,
I have a very embarrassingly parallelizable job that I am trying to speed up
with snow on our local cluster. Basically, I am doing ~50,000 t.test for a
series of micro-array experiments, one gene at a time. Thus, I can easily
spread the load across multiple processors and nodes.
Have you looked at the documentation and help files for R Import/Export;
http://cran.r-project.org/doc/manuals/R-data.pdf
and the read functions
?read.table
?readLines
?count.fields
This is pretty basic stuff. After an extremely cursory look at that
problem I was guessing that it is more
Yes. I'm just for killing time in the rainy weekend. Now I'm using
readLines() to read the file and then output the data as a list.
google.read.list - function(filename){
temp - readLines(filename)
out - NULL
tt - NULL
for(i in 1:length(temp)){
strin - as.numeric(strsplit(temp[i],
Try this. First we read it in using fill = TRUE so that
lines with one number get filled out with NAs. The first
line is T so assign first cell to T and create DF0 which
does not have that line. Then split the data into a list
of data frames starting each group at the line with the
NA in column
Hi,
If I want to import the contents of a R file into another one, I can do
source(foo.R)
However, this imports everything from foo.R, including all functions and
global variables. Is there a way of selectively importing individual
functions etc., in a similar fashion to Python's
from foo
Hi Marco --
Do you know about Bioconductor, http://bioconductor.org ? The
rowttests function in the genefilter package will do what you want
efficiently and on a single node.
# install the package
source('http://bioconductor.org/biocLite.R')
biocLite('genefilter')
# do 500k t-tests
That's a very good idea! Thanks a lot.
On Sat, Nov 29, 2008 at 9:13 PM, Gabor Grothendieck
[EMAIL PROTECTED] wrote:
Try this. First we read it in using fill = TRUE so that
lines with one number get filled out with NAs. The first
line is T so assign first cell to T and create DF0 which
does
But I don't want to ignore all regexp's -- I want to build a regexp which
contains string components which are parameters.
-s
On Sat, Nov 29, 2008 at 6:51 PM, Gabor Grothendieck [EMAIL PROTECTED]
wrote:
grep has a fixed = TRUE argument if you want to ignore all regexp's.
On Sat,
Hi folks,
I am trying to figure out how run a repeated measures ANOVA on the
following data set.
subject trial frequency dplvl
1 FSI052A A 1NA
2 FSI052B B 1NA
3 FSI053A A 1NA
4 FSI055A A 1NA
5 FSI055B B 1
Try this. For each character x in s, if x is punctuation it is replaced
with \\x otherwise with [x] :
library(gsubfn)
gsubfn('.', ~ if (any(grep([[:punct:]], x))) paste0('\\', x) else
paste0('[', x, ']'), s)
See http://gsubfn.googlecode.com
On Sat, Nov 29, 2008 at 10:09 PM, Stavros Macrakis
?confint.glm # ... in MASS
On Nov 28, 2008, at 9:29 AM, Gerard M. Keogh wrote:
Hi all,
simple Q:
how do I extract the upper and lower CI for predicted probabilities
directly for a glm - I'm sure there's a one line to do it but I
can't find
it.
the predicted values I get with the
Wow, you are so lazy... But sometimes R is just designed for lazy guys...
##
f = function(a) {
s = substitute(a)
as.character(s)
}
##
f(a = asdf)
[1] asdf
f(qwer)
[1] qwer
Regards,
Yihui
--
Yihui Xie [EMAIL PROTECTED]
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile:
For the motion chart, I've written a quick example in R (for the
Brownian Motion):
## put random numbers in Google API
# n: number of movie frames
# p: number of points
g.brownian.motion = function(n = 50, p = 20, start = 1900,
digits = 14, file = brownian.motion.html, width = 800,
height
33 matches
Mail list logo