On 11/12/2008 9:45 PM, Mike Rowe wrote:
Greetings!
I come to R by way of Matlab. One feature in Matlab I miss is its
"end" keyword. When you put "end" inside an indexing expression, it
is interpreted as the length of the variable along the dimension being
indexed. For example, if the same fea
Thanks!!! works perfectly. I'll use t(rmultinom(x, m, rep(1,n))/m) for
now and look up in my stats book the formula for determining the
number of sample sizes to achieve a given p level. The second question
was more pertaining to how many combinations are too many to attempt
to calculate every poss
On Fri, 12 Dec 2008, Saptarshi Guha wrote:
Hello,
I have to write single Long to a server written in java. The server
passes the input as
in.readLong() // it expects to receive 8 bytes
In Python, i can do it by sending struct.pack( "!q", value)
However, I have
Hello,
I have to write single Long to a server written in java. The server
passes the input as
in.readLong() // it expects to receive 8 bytes
In Python, i can do it by sending struct.pack( "!q", value)
However, I have tried this
writeBin(length(
Here is another occurrence of wmTSA internal error.
My time series is a short breathing cycle (2425-Cyle_9.txt).
Since wmtsa functions that extract extrema seem to expect longer series than I
have, I tried the folowing two tricks:
1) I prolong the 1-cycle series on both ends through duplicating t
Please don't multiple post, and I believe Rpy has its own help list.
As I understand it, Rpy[2] is an embedded R, in which case there is no
R console. But ask the authors/maintainers (as the R posting guide
suggested).
On Thu, 11 Dec 2008, Karsten Weinert wrote:
Hello,
from my text editor
Its been pointed out to me that the second one is wrong.
It should be:
tail(this.matrix, -2)[, ncol(this.matrix)]
which is not as compact as matlab or my prior post but
still not particularly onerous.
On Thu, Dec 11, 2008 at 11:49 PM, Gabor Grothendieck
wrote:
> Use tail and head. See interspe
Dear R People:
Are there functions for spatial AR and ARIMA models in R, please?
Thanks,
Sincerely,
Erin
--
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com
__
Use tail and head. See interspersed.
On Thu, Dec 11, 2008 at 9:45 PM, Mike Rowe wrote:
> Greetings!
>
> I come to R by way of Matlab. One feature in Matlab I miss is its
> "end" keyword. When you put "end" inside an indexing expression, it
> is interpreted as the length of the variable along th
Greetings!
I come to R by way of Matlab. One feature in Matlab I miss is its
"end" keyword. When you put "end" inside an indexing expression, it
is interpreted as the length of the variable along the dimension being
indexed. For example, if the same feature were implemented in R:
my.vector[5:e
Good point, I actually thought about doing some kind of sampling
before, but now I think I don't have a choice. Essentially, what I am
doing is calculating possible asset allocation possibilities, e.g.
N is the number of available assets and M is the available buckets of
money to spend on the asse
Hi,
I keep getting the error message and a pop-up window for selecting CRAN mirror
server from Rgui.exe after setting the R_Libs
Warning in install.packages(necessary[!installed], dep = T) :
argument 'lib' is missing: using 'D:/Program Files/R/R-2.8.0.libs'
--- Please select a CRAN mirror
and take a look at
?hasArg
hth,
Matthias
Charles C. Berry wrote:
See
?match.call
and note the expand.dots arg.
HTH,
Chuck
On Thu, 11 Dec 2008, Mark Heckmann wrote:
Hi,
How can I check if a certain ... argument has been passed on to my
user-defined function or not?
foo <- functio
Reuben,
On Thu, Dec 11, 2008 at 9:28 PM, Reuben Cummings wrote:
> Good point, I actually thought about doing some kind of sampling
> before, but now I think I don't have a choice. Essentially, what I am
> doing is calculating possible asset allocation possibilities, e.g.
>
> N is the number of av
Thank you very much for the suggestion. I did check into your sample codes:
it creates an factor for the xyplot to condition on. However, this causes a
problem as I have already other factor(s) to conditon on.
I figured out a hard way but using the grid.text inserting "//" at the
physical locat
Here some sample code to interpolate your data using zoo:
by5 is a sequence for every 5 time units which we merge
with z, the original data. Then we use na.approx to replace
all NAs with linear interpolations.
Lines <- "TimeCursorX CursorY Pupilsize
1811543 -1 -1 -1
1811563 -1
Thank you all for the replies. Problem soved!
J
On 12/10/08, Bert Gunter wrote:
>
> I believe the usual practice in this case is simply to give default values
> for arguments:
> function(x, y, opt.arg1 = 0, opt.arg2 = sin(1),...)
>
> If you haven't already done so, perusal of "An Introduction to
On 11/12/2008 7:23 PM, ekwaters wrote:
Any ideas? I certainly have X11, I have tried copying it into other
directories. At present it is in /etc/X11.
You probably don't have the development package for X, with headers,
etc. rgl uses the standard autoconf search for the headers.
Duncan Murdo
Look at rowsum or aggregate:
> Lines <- "classpigeonfalconpropellerjetwingfly
+ birds25 37 00 21
+ planes 0 128 4013
+ birds19 41 01
Any ideas? I certainly have X11, I have tried copying it into other
directories. At present it is in /etc/X11.
This is my error message.
/home/user> R CMD INSTALL -l [/usr/local/R/site-library]
rgl_0.81.orig.tar.gz
* Installing *source* package 'rgl' ...
checking for gcc... gcc -std=gnu99
checki
Yu, Changhong wrote:
Dear all,
I used cph() function from Frank harrell's Design package to create a
survival model, then used functions 'Function' and 'sascode' to generate
prediction equation based on the saved survival model. But it failed. I
included a stratified variable in the model. If I
Dear Carlos,
Try this:
# Working directory
setwd("C:/")
# Generating 10 files
sapply(1:10, function(x){
# Create X
X= matrix(rnorm(100),ncol=10)
# Write X
write.table(X, paste('my_matrix_',x,'.dat',sep=""),
quote=FALSE,sep='\t',col.names=FALSE,row.name
Dear Reuben,
[snip]
> my questions now are... how would I generalize functions 3 and 4 for m
> And, which of the 4 functions would be best for varying ranges of
> n and m? I am expecting values for n to range between 1 and 1e3, while
> m will range between 1 and 1e6.
>
> Reuben
>
Regarding your
Dear Pete,
You haven't told us what your data is, and we can only surmise -- not
very helpful for you and annoying for those who try to help.
Pete Shepard wrote:
Hello,
I have a file with two dependent variables (three and five) and one
independent variable. I do i.mod <- lm(cbind(three, fi
I have a data file that looks like this
classpigeonfalconpropellerjetwingfly
birds25 37 00 21
planes 0 128 4013
birds19 41 01 4
Hello all :)
I have a for loop where in each cycle I create certain matrix object,
let´s say, X, I would like to write it
so I use the write.table function but I would like to write as many
matrices as cycles, this is, I would like
to use a variable, let´s say y, that will be in the for, as in:
you might try the following.
Pochhammer_n <- function (a,b,c,n) {
if(n==0) return(1)
return(a*b*Pochhammer_n(a+1, b+1, c+1, n-1)/(c*n))
}
hypergeo_sum <- function (a,b,c,z,n) {
comb_sum <- 0
for (i in 0:n) {
comb_su
Hello,
from my text editor (on winxp) I interact with R using the python
module rpy2. This works nice for plot commands, i.e. a window opens
and shows the plot. It also works nice for the file.show command.
Sometimes, however, I would like to see the console window. Is there a
way to make rpy2 sh
Thanks for the suggestions!! I upgraded R which solved a few of my
problems and got the following functions to work:
# works for m > 2
# requires {prob]
multisets1 <- function(n, m) {
as.matrix(urnsamples(1:n, size = m, ordered = FALSE, replace = TRUE))
}
# works for m > 2
# requires {mu
Dear all,
I used cph() function from Frank harrell's Design package to create a
survival model, then used functions 'Function' and 'sascode' to generate
prediction equation based on the saved survival model. But it failed. I
included a stratified variable in the model. If I removed the
stratificat
Hi;
I am running generalized linear mixed models (GLMMs) with the lmer function
from the lme4 package in R 2.6.2. My response variable is overdispersed, and
I would like (if possible) to run a negative binomial GLMM with lmer if
possible. I saw a posting from November 15, 2007 which indicated tha
yes, that is correct. I was looking in text mode.
ok, thanks for your help.
-Whit
On Thu, Dec 11, 2008 at 4:02 PM, Prof Brian Ripley
wrote:
> On Thu, 11 Dec 2008, Whit Armstrong wrote:
>
>> Thanks, Gabor and Prof. Ripley.
>>
>> Sorry for the oversight.
>>
>> I grepped the lapply help for recur
This has been solved in an earlier post:
http://www.nabble.com/linear-interpolation-of-multiple-random-time-series-to11694879.html
On Thu, Dec 11, 2008 at 4:38 PM, tsunhin wong wrote:
> Dear all R users,
>
> I am going to use R to process some of my physiological data about eye.
>
> The problem
Bert has pointed out to me that the R definition of "deprecated" is
considerably more draconian than that in most other systems:
? Deprecated
"These functions are provided for compatibility with older versions
of *R* only, and may be defunct as soon as the next release."
I would certain
On Thu, 11 Dec 2008, Paige Barlow wrote:
I am attempting to fit a full zero-inflated Poisson model then use backward
elimination to arrive at the best-fitting model. When I try to fit the model
with zeroinfl() I get this error:
Error in while (abs((ll_old - ll_new)/ll_old) > control$reltol)
On Thu, 2008-12-11 at 17:23 +0200, Kenn Konstabel wrote:
> Hi,
>
> I agree -- and my examples using round were meant as bad and dangerous
> examples. Using round at the last step is better and may solve the problem,
> but in your example ...
>
> > round(8.8-7.8,1)==1
> [1] TRUE
>
> ... you have
Hello,
from my text editor (on winxp) I interact with R using the python
module rpy2. This works nice for plot commands, i.e. a window opens
and shows the plot. It also works nice for the file.show command.
Sometimes, however, I would like to see the console window. Is there a
way to make rpy2 sh
Though the results of using plot() with a factor may not always be what you
expect, as plot.factor() differs from plot().
Sarah
On Thu, Dec 11, 2008 at 4:36 PM, Peter Alspach
wrote:
> Tena koe
>
> Try
>
> mice$X <- factor(mice$X, levels=mice$X)
> plot(Green.1~X,data=mice)
>
> HTH
>
> Peter
Then yes, you can do something like I originally suggested, though there
are other possible approaches.
Making up fake data rather than typing yours in:
> testdata <- as.data.frame(matrix(1:15, ncol=3))
> testdata <- cbind(c("D", "E", "A", "C", "B"), testdata)
> colnames(testdata) <- c("X", "c1",
Tena koe
Try
mice$X <- factor(mice$X, levels=mice$X)
plot(Green.1~X,data=mice)
HTH
Peter Alspach
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of qroberts
> Sent: Friday, 12 December 2008 9:12 a.m.
> To: r-help@r-proje
I am attempting to fit a full zero-inflated Poisson model then use
backward elimination to arrive at the best-fitting model. When I try to
fit the model with zeroinfl() I get this error:
Error in while (abs((ll_old - ll_new)/ll_old) > control$reltol) { :
missing value where TRUE/FALSE n
Hi
#Create data and data frames
x=rnorm(5,0,1)
y=rnorm(5,0,1)
z=rnorm(5,0,1)
d1=data.frame(x,y)
d2=data.frame(y,z)
#which variable name in d2 is a variable name in d1?
names(d2[names(d2)%in%names(d1)]) # it's y
#give me the columns of d2 that have variable names
#that are also variable names in
Hi,
i want to combine several data.frames in to one big data.frame. The problem is
that length of the column in each data.frame is diffrent. cbind or rbind dont
work here. i wrote my own function to solve it which really unefficient. If
some has a neat solution, it will be highly appriciated.
This is the format of the table as it appears in R
>mice
X Green.1 Yellow.2 Blue.3 Gray.4
1 Base 469.5399 508.1532 487.1443 492.2544
2PBS 459.6553 474.0124 417.2651 392.9518
3 25 Mch 359.6216 418.0417 377.7020 394.2102
4 50 Mch 206.1835 262.8818 252.80
On Thu, 11 Dec 2008, tsunhin wong wrote:
Dear all R users,
I am going to use R to process some of my physiological data about eye.
The problem is the recording machine does not sample in a reliably
constant rate: the time intervals between data sampled can vary from
9msec to ~120msec, while mo
Hi, I am simulating 2-dimensional data using the RandomFields library and
the gaussRF function therein. While this is done with the code below, I
would like the landscape to be continuous or smooth at the edges. That is, I
would like the upper edge to smoothly connect to the lower edge AND the
righ
Hi all,
Is there a function to extract row names from a data frame based on
row names from another data frame? I can write a loop function to do
this, but this may be inefficient in terms of processing.
thanks for any information,
Wade
__
R-help@r-pr
On Thu, 11 Dec 2008, Whit Armstrong wrote:
Thanks, Gabor and Prof. Ripley.
Sorry for the oversight.
I grepped the lapply help for recursive prior to sending my question.
why does it appear as "*r*ecursive" in the help file? or is that just
a formating problem on my machine?
It is marked as
replies inline below.
Bert Gunter wrote:
> Replies inline below.
>
>
> [bert (?)]...?tapply says that the first argument is an **atomic**
> vector. A
> factor is not an atomic vector. So tapply interprets it as such by looking
> only at its representation, which is as integer values.
>
Is there an equivalent to MPlus's Full Information Maximum Likelihood (FIML)
missing data estimator for R? If so, is there a way to take covariance
structures produced by such a package and perform multiple regression with
these?
If you are unfamiliar with Mplus' FIML below is a link to their manu
Thanks, Gabor and Prof. Ripley.
Sorry for the oversight.
I grepped the lapply help for recursive prior to sending my question.
why does it appear as "*r*ecursive" in the help file? or is that just
a formating problem on my machine?
-Whit
On Thu, Dec 11, 2008 at 3:13 PM, Prof Brian Ripley
wro
Dear all R users,
I am going to use R to process some of my physiological data about eye.
The problem is the recording machine does not sample in a reliably
constant rate: the time intervals between data sampled can vary from
9msec to ~120msec, while most around in the 15-30msec range.
The below
Joe Trubisz wrote:
Hi...
Is this possible in R?
I have 2-sets of data, that were collected simultaneously using
2-different data acquisition schemes.
The x-values are the same for both.
The y-values have different ranges (16.4-37.5 using one method, 557-634
using another).
In theory, if yo
Bert,
Thanks for your reply. I suspect we agree more than you might think
Comments inline below. I've snipped out parts.
-s
On Thu, Dec 11, 2008 at 2:45 PM, Bert Gunter wrote:
> Rationale? -- you'll have to ask the developers
Hmm. It would be nice if this could be doc
On Thu, 11 Dec 2008, Whit Armstrong wrote:
for a simple example:
x <- list()
x[["a"]] <- list(a=c(1,2,3),b=c(3,4,5))
x[["b"]] <- list(a=c(6,7,8),b=c(9,10,11))
lapply(x,sum)
this fails w/
Error in FUN(X[[1L]], ...) : invalid 'type' (list) of argument
Just wondering if I have overlooked somet
On Thu, Dec 11, 2008 at 2:55 AM, Thomas Zumbrunn wrote:
> I'm trying to use a lattice function within a function and have problems
> passing the "groups" argument properly. Let's say I have a data frame
>
> d <- data.frame(x = rnorm(100), y = c("a", "b"))
>
> and want to plot variable x in a densi
Hello,
I have a file with two dependent variables (three and five) and one
independent variable. I do i.mod <- lm(cbind(three, five) ~ species,
data=i.txt) and get the following output:
Coefficients:
three five
(Intercept) 9.949 9.586
species -1.166 -1.156
I do a" i.ca
Perhaps you mean is that the definition ought be otherwise but
at least according to one standard the definition is correct:
http://www.opengroup.org/onlinepubs/009695399/functions/strptime.html
On Thu, Dec 11, 2008 at 3:01 PM, Hans W. Borchers wrote:
> Gabor Grothendieck gmail.com> writes:
>
>
This will recursively lapply and may or may not be
what you are looking for:
rapply(x, sum)
On Thu, Dec 11, 2008 at 2:59 PM, Whit Armstrong
wrote:
> for a simple example:
>
> x <- list()
> x[["a"]] <- list(a=c(1,2,3),b=c(3,4,5))
> x[["b"]] <- list(a=c(6,7,8),b=c(9,10,11))
>
> lapply(x,sum)
>
>
>
Gabor Grothendieck gmail.com> writes:
>
> According to the definition in ?strptime (which is not the same as the
> ISO definition):
>
> format(x, "%W") returns
>
> "Week of the year as decimal number (00–53) using Monday as the first
> day of week (and typically with the first Monday of the ye
for a simple example:
x <- list()
x[["a"]] <- list(a=c(1,2,3),b=c(3,4,5))
x[["b"]] <- list(a=c(6,7,8),b=c(9,10,11))
lapply(x,sum)
this fails w/
Error in FUN(X[[1L]], ...) : invalid 'type' (list) of argument
Just wondering if I have overlooked something obvious.
one can also do:
lapply(x,lapp
It would be easier to answer your question if we knew what your
data look like, what R commands you've tried, and what result
you want.
One possibility: plot the data against 1:nrow(yourdata), and add
the row names as labels.
Sarah
On Thu, Dec 11, 2008 at 2:35 PM, qroberts wrote:
>
> I'm new to
I'm new to R so forgive me if this seems like a simple question:
So I have table where the row titles are string variables. When I plot the
data with rows along the x-axis, the data is ordered alphabetically as
opposed to the order of the table.
How can I preserve the row order of the table in t
Replies inline below.
Best regards,
-- Bert
___
From: macra...@gmail.com [mailto:macra...@gmail.com] On Behalf Of Stavros
Macrakis
Sent: Thursday, December 11, 2008 10:53 AM
To: Bert Gunter
Cc: Patrizio Frederic; r-help@r-project.org
Subject: Re: [R] repeated searchin
According to the definition in ?strptime (which is not the same as the
ISO definition):
format(x, "%W") returns
"Week of the year as decimal number (00–53) using Monday as the first
day of week (and typically with the first Monday of the year as day 1
of week 1). The UK convention."
The first da
Gabor Grothendieck gmail.com> writes:
>
> format(d, "%U") and format(d, "%W") give week numbers using
> different conventions. See ?strptime
Gabor,
the results of format(aDate, "W") appear to be incorrect anyway, see:
format(as.Date("2008-01-01"), "%W") #-> "00"
There is never a wee
See
?match.call
and note the expand.dots arg.
HTH,
Chuck
On Thu, 11 Dec 2008, Mark Heckmann wrote:
Hi,
How can I check if a certain ... argument has been passed on to my
user-defined function or not?
foo <- function(data, ...)
{
### here I want to check whether xlab was passed
Try this:
foo <- function(data, ...)
{
### here I want to check whether xlab was passed with the ... arguments
### or if the ... arguments did not contain an xlab argument
args <- list(...)
return(ifelse("xlab" %in% names(args), "Exists", "Missing"))
}
On Thu, Dec 11, 2008 at 4:22 PM, Mark Heckma
Hi,
How can I check if a certain ... argument has been passed on to my
user-defined function or not?
foo <- function(data, ...)
{
### here I want to check whether xlab was passed with the ... arguments
### or if the ... arguments did not contain an xlab argument
}
I tried missing(xlab) , exist
On Wed, Dec 10, 2008 at 6:39 PM, Bert Gunter wrote:
> ...?tapply says that the first argument is an **atomic** vector. A factor
> is not an atomic vector. So tapply interprets it as such by looking only at
> its representation, which is as integer values.
>
What is the rationale for this? If it
Hi,
I often have the problem of combining data sets of different lengths
together.
Simple example: I have data frame "a", with two columns "C1" and "C2"
and another data frame "b" with only one column "V1".
Data frame "b" is much bigger than "a", but "C1" of "a" has the same
levels as "V1"
On Thu, 11 Dec 2008, Reuben Cummings wrote:
Hi,
This has been asked before but not sufficiently answered from what I
could find. How do you create combinations
with repetitions (multisets) in R?
If I have
set <- array(1:3)
Why wrap 1:3 in array() ??
And I want to choose all combinations
Dear Reuben,
On Thu, Dec 11, 2008 at 12:53 PM, baptiste auguie wrote:
> Hi,
>
> Perhaps you can use expand.grid and then remove the mirror combinations,
>
>> values <- 1:3
>> tmp <- expand.grid(values, values)
>> unique.combs <- tmp[tmp[, 1]<=tmp[, 2], ]
>> unique.combs[do.call(order, unique.com
Dear R-user
I need a function to approximate a complex integration. My function is:
aprox2=function(s,x,rate){
dexp(x,rate)*exp(-s*x)
}
where argument s is a complex number. I can't use the integrate function
because it's only used with "numeric" arguments
Does anyone know some function to
Dear R users --
I think this question was asked before but there was no reply to it.
I would appreciate any suggestion any of you might have. I am
interested in plotting several "implicit functions" (F(x,y,z)=0) on
the same fig. Is there anyone who has an example code of how to do
this?
Than
If they are IDs, you presumably don't need to perform arithmetic on them, so
why not store them as strings? If you're reading them with read.table, see
the colClasses parameter. I am not sure how to do this in RODBC;
as.isthere (as in read.table) does not affect columns that look like
numbers --
i %in% c(7,10,30,50)
On Thu, Dec 11, 2008 at 12:11 PM, David B. Thompson, Ph.D., P.E., D.WRE, CFM
wrote:
> OK, this should be trivial but I'm not finding it. I want to compress the
> test,
>
> if (i==7 | i==10 | i==30 | i==50) {}
>
> into something like
>
> if (i in c(7,10,30,50)) {}
>
> so I ca
Hi,
Perhaps you can use expand.grid and then remove the mirror combinations,
values <- 1:3
tmp <- expand.grid(values, values)
unique.combs <- tmp[tmp[, 1]<=tmp[, 2], ]
unique.combs[do.call(order, unique.combs), ] # reorder if you wish
Var1 Var2
111
412
713
522
Hi,
It is generally not the case that the best PC set, say, the top k PCs (where
k < p, p being the number of predcitors) contain the best predictor subset
in linear regression. Hadi and Ling (Amer Stat, 1998) show that it is even
possible to have an extreme situation where the first (p-1) PCs co
> OK, this should be trivial but I'm not finding it. I want to compress
> the test,
>
> if (i==7 | i==10 | i==30 | i==50) {}
>
> into something like
>
> if (i in c(7,10,30,50)) {}
>
> so I can build a "excludes" vector
>
> excludes <- c(7,10,30,50)
>
> and test
>
> if (i in excludes) {}
Wo
A quick question really:
I have a database with extremely long integer IDs (eg
588848900971299297), which is too big for R to cope with internally
(it appears to store as a double), and when I do any frequency tables
erroneous results appear. Does anyone know of a package that extends
int
hi all,
I want to do a plot and put the legend on the left of y axis this is my
code:
x<-seq(1980,2005,1)
plot(x,tfa_ita,type="l",col=1,xlim=c(1979,2005),ylim=c(0.2,1.7),xlab="",ylab="",main="Totale
Attivita` Finanziarie")
lines(x,tfa_spa,type="l",col=2)
lines(x,tfa_aus,type="l",col=3)
lines(x,tf
Hi,
This has been asked before but not sufficiently answered from what I
could find. How do you create combinations
with repetitions (multisets) in R?
If I have
> set <- array(1:3)
And I want to choose all combinations of picking 2 numbers, I want to
get a print out like
[,1] [,2]
[1,]
Take a look at ?any.
On Thu, Dec 11, 2008 at 3:11 PM, David B. Thompson, Ph.D., P.E.,
D.WRE, CFM <[EMAIL PROTECTED]> wrote:
> OK, this should be trivial but I'm not finding it. I want to compress the
> test,
>
> if (i==7 | i==10 | i==30 | i==50) {}
>
> into something like
>
> if (i in c(7,10,30,50
On Thu, Dec 11, 2008 at 2:10 PM, Prof Brian Ripley
<[EMAIL PROTECTED]> wrote:
> A slightly simpler version is
>
> format(Sys.Date(), "%V")
>
>
> On Thu, 11 Dec 2008, Prof Brian Ripley wrote:
>
>> strftime(x, "%V")
>>
>> E.g.
>>
>> strftime(as.POSIXlt(Sys.Date()), "%V")
>>
>> is "50", and you might
Have you looked at the R interface to gmp?
http://cran.r-project.org/web/packages/gmp/index.html
Rory Winston
RBS Global Banking & Markets
Office: +44 20 7085 4476
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Aaron Robotham
Sent: 11 December 2008 17:
have a look at merge(), e.g.,
df1 <- data.frame(A = c(1,2), B = c("m","f"), C = c("at home", "away"))
df2 <- data.frame(A = c(2), C = c("at home"))
merge(df1, df2, all = TRUE, sort = FALSE)
I hope it helps.
Best,
Dimitris
Stefan Uhmann wrote:
Dear List,
I have two dataframes with overlapp
Hi,
We're using stats4 for a logistic regression. The code is
chdreg.logit2 <- glm(chd ~ age + sex, family = binomial)
summary(chdreg.logit2)
oddsratios <- coef(chdreg.logit2)
exp(oddsratios)
# Calculate model predicted values
pred <- predict(chdreg.logit2,type="response")
The glm part runs f
OK, this should be trivial but I'm not finding it. I want to compress
the test,
if (i==7 | i==10 | i==30 | i==50) {}
into something like
if (i in c(7,10,30,50)) {}
so I can build a "excludes" vector
excludes <- c(7,10,30,50)
and test
if (i in excludes) {}
However, I'm not finding a clue
A quick question really:
I have a database with extremely long integer IDs (eg
588848900971299297), which is too big for R to cope with internally
(it appears to store as a double), and when I do any frequency tables
erroneous results appear. Does anyone know of a package that extends
int
Please do read the help page: fortune("WTFM") applies.
On Thu, 11 Dec 2008, Gerard M. Keogh wrote:
Hi all,
Just on this question :
can I assume any R internal defined function can be used to describe the
link (e.g. = "arctan") so long as its increasing and monotone?
How might abs work for exa
do you mean something like the following:
f <- function (x) {
deparse(substitute(x))
}
x <- 5
y <- 6
z <- 7
f(x)
f(y)
f(z)
I hope it helps.
Best,
Dimitris
Philip Whittall wrote:
Dear List,
I am writing a function in R with the facility to store models for later
use in scoring.
It wou
Sorry for the last post. I didn't use the latest version of R. It
works under Linux as well for R-2.8.0 patch.
Best
On Thu, Dec 11, 2008 at 11:34 PM, ronggui <[EMAIL PROTECTED]> wrote:
> Sys.setlocale(,"C")
> x1 <- as.character(date()) # I use date to record the time, and save
> it to sqlite data
Thank you
ryancw wrote:
>
> Not an R package, but EpiData is free software designed to to exactly
> this. It's a wonderful piece of software. Define fields, add annotations,
> provide defaults, provide allowable values or ranges, calculate one field
> based on entry to another, conditional ski
Hi all,
Just on this question :
can I assume any R internal defined function can be used to describe the
link (e.g. = "arctan") so long as its increasing and monotone?
How might abs work for example - (except at 0)?
And/or finally, can I define any old function in R called "myfun" and use
link="
On 12/11/2008 11:01 AM, Mark Heckmann wrote:
Hi everyone,
I want to write a wrapper function that uses the hist() function. Now I want
to allow the hist breaks argument as optional in my function. So when my
function contains the breaks argument I want the hist() function to use it,
if not, I wa
Dear Alessia,
I am very new to R and wanted to know if there is a package that, given very
long nucleotide sequences, searches and identifies short (7-10nt) motifs.. I
would like to look for enrichment of certain motifs in genomic sequences.
I tried using MEME (not an R package, I know), b
On Thu, 11 Dec 2008 15:19:03 +0100, hadley wickham <[EMAIL PROTECTED]> wrote:
You (as many before you) have overlooked the ave() function, which can
replace the ordering as well the do.call(c,tapply())
Majority of questions on this list concern data manipulation. Many are
repetitive. "Ove
Hi Shubha,
I'm replying offlist because although I don't have an answer to your
question, i thought i would point you in the direction of Rmetrics
(http://www.rmetrics.org/rmetricsPackages.htm) as there might be
something in there that may be helpful if you don't get a more direct
answer from your
Hi Shubha
I have created an extension DLL for downloading time series data from Reuters.
You can download it from here:
http://www.theresearchkitchen.com/blog/archives/287
There is also a short manual available at the same location:
http://www.theresearchkitchen.com/blog/wp-content/uploads/200
1 - 100 of 146 matches
Mail list logo