hi Thomas/All,
I went through the thread(
https://stat.ethz.ch/pipermail/r-sig-finance/2006q1/000682.html which
concerns with swaps). Yeah it is correct that i would like to quote both
David and Krishna that the curve interpolation may vary considerably (for
e.g. any polynomial/parametric fit
I wonder if anyone can help me with this query?
I am undertaking textual content analyses which result in time series
data (i.e., relative frequency counts of word categories in successive
segments of a larger text or in successive individual texts in a
temporal order). In regard to the content
On Mon, 9 Oct 2006, Mstislav Elagin wrote:
Hi, All,
I have come across a problem building a DLL from .f90 source (R 2.3.1,
Windows XP). When using the R CMD SHLIB procedure, the DLL itself was
being built, but its export table was empty.
Among the output from R CMD SHLIB the following
On Fri, 29 Sep 2006, Sarosh Jamal wrote:
I've been getting the following warning on each package update/install (Rv2.4
on SunOS9):
Each? This only applies to a few packages, and is only a warning.
Warning message:
'DESCRIPTION' file has 'Encoding' field and re-encoding is not possible.
y-round(c(0.68,0.95,b,c,d),2)
rank(y)
[1] 3.5 5.0 1.0 2.0 3.5
On 10/10/06, Li Zhang [EMAIL PROTECTED] wrote:
Does anyone know why the two rank functions gives
different results? I need to use the rank function in
a for loop, so the sequence to be ranked is given
values in the form of part
Because y[1] and y[5] are not the same in Part1 but are in Part2:
# using y from Part1
y[5] - y[1]
[1] 1.110223e-16
You could round your numbers to 2 digits, say:
rank(round(100*y)) # y is from Part1
[1] 3.5 5.0 1.0 2.0 3.5
On 10/10/06, Li Zhang [EMAIL PROTECTED] wrote:
Does anyone know
On Tue, 10 Oct 2006, Gabor Grothendieck wrote:
Because y[1] and y[5] are not the same in Part1 but are in Part2:
# using y from Part1
y[5] - y[1]
[1] 1.110223e-16
Yes, this is FAQ 7.31: Why doesn't R think these numbers are equal?
i-1.94
d-2.62-i
print(0.68, digits=16)
[1] 0.68
Hi there,
I am trying to install from the source R-2.4.0 on my mac (osx 10.4.8
G5 DP)
The error imply Tcl/Tk.
I install it by all the way I know: darwinport, the Tcl/Tk package
from the dmg available from CRAN but without success.
The PATH is correct.
tclConfig.sh is localised in
Dear colleagues,
I face a problem doing haplotype analyses with haplostats: when I use
the haplo.em function, the programme gives an error message because of
'recursive default argument reference.' I am not able to figure out what
this means. Could you perhaps help me?
The full output is the
Dear R-helper,
Is there any thing that I am doing wrong in the following codes:
norm.cop - normalCopula(0.5)
persp(norm.cop, dcopula)
The last command produces what follows
Error in persp(x, y, z, xlim, ylim, zlim, theta, phi, r, d, scale,
expand, :
invalid 'x' argument
In addition:
Li Zhang wrote:
Does anyone know why the two rank functions gives
different results? I need to use the rank function in
a for loop, so the sequence to be ranked is given
values in the form of part (1). How can I use
assignment like in part (1) to get correct ranks as in
part (2)?
Thank
Hi,
I want to make a surface3D plot of a landscape. I have cordinates (x, y, z)
recorded with a GPS. The datapoints are not evenly distributed within the
rectangular area.
To do a fast 3D plot I used following.
library(grid)
library(lattice)
v - read.table(clipboard)
names(v) - c(x, y, z)
Dear all,
I am having troubles importing values written as scientific notation
using read.table(). I'm sure this is a frequent problem, as many
people in my lab have this problem as well, so I'm sure that I just
have troubles googling for the right solution.
The problem is, that, given a file
Can someone help interprete the error message below? i was trying to
load the package copula from the R command prompt.
Error in loadNamespace(package, c(which.lib.loc, lib.loc), keep.source =
keep.source) :
in 'copula' methods specified for export, but none defined: show,
summary, persp,
On Fri, 6 Oct 2006, Christian Bieli wrote:
Hi all
I have to generate some test data for import in an sql database. The
database is meant for web-based data entry in a study taking place in a
german speaking region, so factor levels of the variables include umlauts.
The variables in the
Which Solaris is this? I am not seeing any problems with our Solaris 8
systems. Was the compiler built on that exact system? What gcc options
were used (-std=gnu99, as recommended, for instance)?
It looks like a system header problem: __builtin_isnan ought to be
built in, not an external
Your example does not exhibit that behavior when I try it (below).
Can you provide a reproducible example following the style
shown here:
Lines - a 1 2e-4
+ b 2 3e-8
DF - read.table(textConnection(Lines))
str(DF)
'data.frame': 2 obs. of 3 variables:
$ V1: Factor w/ 2 levels a,b: 1 2
$
On FC5 Linux:
gannet% cat foo.dat
a 1 2e-4
b 2 3e-8
gannet% R
...
read.table(foo.dat)
V1 V2V3
1 a 1 2e-04
2 b 2 3e-08
sapply(read.table(foo.dat), class)
V1V2V3
factor integer numeric
so please tell us your environment and give a reproducible example.
Thanks for your answer.
I went round the problem by directly connect to the sql-database instead
of generating a .csv file and then upload it.
This works perfectly with the RODBC package and is much more suitable, too.
Kind regards
Christian
Prof Brian Ripley schrieb:
On Fri, 6 Oct 2006,
Dominique Katshunga wrote:
Can someone help interprete the error message below? i was trying to
load the package copula from the R command prompt.
Error in loadNamespace(package, c(which.lib.loc, lib.loc), keep.source =
keep.source) :
in 'copula' methods specified for export, but none
Oh, thanks, that was hint enough :-) I see it now. I turns that R does
not understand
e-10
...which stands for 1e-10 and is produced by some of the bioinformatic
applications that I use (notably BLAST). However, R instead of being
verbose on that just assumes that the whole column is a string.
I think the colClasses argument to read.table() is what you need.
Either that, or explicitly cast columns in the data.frame that's
returned by read.table(). That's how you get data types that aren't
directly supported by read.table(), like various date formats.
- Martin
January Weiner wrote:
On Tue, 10 Oct 2006, January Weiner wrote:
Oh, thanks, that was hint enough :-) I see it now. I turns that R does
not understand
e-10
...which stands for 1e-10 and is produced by some of the bioinformatic
applications that I use (notably BLAST).
And that is not standard C notation.
Hi,
If you want parametric modes you could fit mixtures with different numbers
of components and select the best model with your favourite model-selection
criterion. Various packages such as mclust and fitdistr may be helpful in
doing this, the cluster task view has many more:
A cheeky solution by subverting the coerce mechanism and read.table:
# install a coerce function which can fix the e+10 syntax for an
imaginary class myDouble:
setAs(character, myDouble, function(from)as.double(sub('^(-?)
e','\\11e',from)))
Warning message:
in the method signature for
note: this e-mail is supposed to precede my coerce hack one.
As an example of the other posters mentioning colClasses, with some
debugging notes:
# create a pretend file for this example
Lines - scan(sep=\n, what=)
a 1 3e-8
b 2 1e+10
c 3 e-10
d 4 e+3
file - textConnection(Lines)
#
Hi,
My name is Edison and this is the first time I write to this list. I have
been trying without success to find a package or function in R that
calculates sample sizes for multiple events survival models. Does anyone
have an advice that could help me?
best regards,
edison
Hi,
when using the script file for cokriging, is there any way to fit cross
variogram other than linear, I mean what other options can I put in place
of fit.lmc
I ll be very appreciated if somebody who know the answer can response to me
thanks
On 10/9/2006 10:06 AM, hadley wickham wrote:
Current .Rd documentation has some obvious problems:
- the parser strips comments out of examples when it runs them
- there's no way to put images into the documentation
- the keywords aren't much use
- there's isn't a definition anywhere of what
Dear friends,
I am sorry, I again rise that boring question about font embedding in
EPS figure.
I found some discussions on this topic but there were no strait solution.
The publisher (AIP) demands submission of separate EPS file
for each figure with all fonts embedded in it (even the standard
I am trying to generate a vector of random numbers with the constraint that
they have to sum up to one with uniform distribution.
eg. {0.1,0.7,0.2 }
any function to do this? Thanks.
__
R-help@stat.math.ethz.ch mailing list
As I have previously asked, in response to a similar
question: Is this a homework problem?
cheers,
Rolf Turner
[EMAIL PROTECTED]
__
R-help@stat.math.ethz.ch
On Tue, 10 Oct 2006, Yury Yuryev wrote:
Dear friends,
I am sorry, I again rise that boring question about font embedding in
EPS figure.
It gives us an opportunity to point you to the solution included in R
2.4.0.
I found some discussions on this topic but there were no strait solution.
Rolf Turner [EMAIL PROTECTED] writes:
As I have previously asked, in response to a similar
question: Is this a homework problem?
If so, he has a pretty nasty teacher...
--
O__ Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box
sun [EMAIL PROTECTED] writes:
I am trying to generate a vector of random numbers with the constraint that
they have to sum up to one with uniform distribution.
eg. {0.1,0.7,0.2 }
any function to do this? Thanks.
Depending on what you mean by uniform, this may be a solution
x-runif(3)
The trick is in defining random in the face of the three apparently
incompatible constraints that the numbers be random, that they sum to 1,
and that they be uniformly distributed. Tell us more. Perhaps extend
Peter D's solution by first deciding (at random) how many components
each solution
I was working on windows xp for a while and now i am back to linux ( not
sure which kind but I can find out if that helps ) and i just have two
questions that are
really environment R questions rather than R code questions.
1) i use emacs ( or xemacs if need be ) and i vaguely being able to cut
HI,
I am trying to figure out an efficient way to calculate group means and
associate each entry with it. I made up an example:
A = rep(rep(0:1,each=2),3)
B = rep(rep(0:1,4),3)
C = rep(rep(c(0,0,1,1),2),3)
X =cbind(rnorm(24,0,1),runif(24,0,1),A,B,C)
On 10 October 2006 at 10:51, Leeds, Mark \(IED\) wrote:
| 1) i use emacs ( or xemacs if need be ) and i vaguely being able to cut
| a line or a region in an emacs window and then paste it at my R prompt
| so that it ran. Could I be mistaken
| or is there an option I need to set in my
On 10/10/2006 9:53 AM, Peter Dalgaard wrote:
sun [EMAIL PROTECTED] writes:
I am trying to generate a vector of random numbers with the constraint that
they have to sum up to one with uniform distribution.
eg. {0.1,0.7,0.2 }
any function to do this? Thanks.
Depending on what you mean
You can do it directly from the X matrix like so:
by(X, as.list(as.data.frame(X[,3:5])), function(R)weighted.mean(R
[1], R[2]))
A: 0
B: 0
C: 0
[1] 0.4912458
A: 1
B: 0
C: 0
[1] NA
Here are two ways:
f1 - function(i) weighted.mean(X[i,1], X[i,2])
aggregate(list(wmean = 1:nrow(X)), as.data.frame(X[,3:5]), f1)
f2 - function(x) data.frame(wmean = weighted.mean(x[,1], x[,2]), x[1, 3:5])
do.call(rbind, by(X, as.data.frame(X[,3:5]), f2))
Also you check out the na.rm= argument
Hi all,
update.default, which is the method used to update lm objects (among
others), extracts the call element from it's first argument, updates
it, then evaluates it in the parent.frame(). Shouldn't it be evaluated
in environment(formula(object)), if that's non-NULL?
I ask because I call lm
I have been reviewing the arch test of vars package that is based on
Engle's paper. R-metrics has this as a wants/todo item. I need an arch
test and thought I might accomplish two things at once or at least try.
The arch test requires a varest object and I am trying to write one that
will
On 10/10/06, Gustaf Granath [EMAIL PROTECTED] wrote:
Hi,
I want to make a surface3D plot of a landscape. I have cordinates (x, y, z)
recorded with a GPS. The datapoints are not evenly distributed within the
rectangular area.
To do a fast 3D plot I used following.
library(grid)
As a workaround use evaluate=FALSE argument to update and
evaluate it yourself fetching the environment from the innards
of the lm structure:
f - function() {
DF - data.frame(y = 1:12, x1 = gl(2, 1, 12), x2 = gl(2,6))
lm(y ~ x1, DF)
}
f.lm - f()
e - attr(terms(f.lm), .Environment)
Gabor Grothendieck wrote:
As a workaround use evaluate=FALSE argument to update and
evaluate it yourself fetching the environment from the innards
of the lm structure:
f - function() {
DF - data.frame(y = 1:12, x1 = gl(2, 1, 12), x2 = gl(2,6))
lm(y ~ x1, DF)
}
f.lm - f()
e -
Mark,
you could also try rkward a gui for R from
http://rkward.sourceforge.net/
or JGR. I have experimented with both because like you I have been
avoiding learning ESS, and emacs just confuses me.
rkward seems fine with a few quirks that I need to report as problems,
like the object browser
It does seem strange to me too. I guess what one could say
is that from an oo viewpoint the internal environment within f
is the object space and update needs to be a method of it which
could be arranged by including update in your lm object:
f - function() {
DF - data.frame(y = 1:12, x1 =
Hey R-helpers,
Does anybody know of an implementation of interval PLS in R?
Thx,
Dirk
--
Dirk De Becker
Work: Kasteelpark Arenberg 30
3001 Heverlee
phone: ++32(0)16/32.14.44
fax: ++32(0)16/32.85.90
Home: Waversebaan 90
3001 Heverlee
phone: ++32(0)16/23.36.65
On Tue, 10 Oct 2006, Martin C. Martin wrote:
Thanks, or even just:
e - environment(formula(f.lm))
But this was more of a bug report. Is update.default wrong? Should it
be changed? I don't see how evaluating in update's parent environment
would ever be better default behavior than the
Great; thanks for the detailed explanation!
- Martin
Thomas Lumley wrote:
On Tue, 10 Oct 2006, Martin C. Martin wrote:
Thanks, or even just:
e - environment(formula(f.lm))
But this was more of a bug report. Is update.default wrong? Should it
be changed? I don't see how evaluating in
From the following:
basin.map - readAsciiGrid(c:/temp/area.asc, colname=area)
I have a SpatialGridDataFrame which has the x and y cordinate of a cell, and
the drainage area of that cell. There are many cells with a low drainage
area (in my case, 33000 with an area of 37.16) and one cell with
The following code works fine:
# g is the function that returns the square of a number
g - function(y) y^2
# f1 is a function that takes one function
# as argument, and returns another function
f1 - function(f) function(x) f(x+1) - f(x)
# h(x) is g(x+1) - g(x) or 2x + 1
h - f1(g)
# h(1) = 3
#
On 10/10/2006 1:32 PM, Martin C. Martin wrote:
Gabor Grothendieck wrote:
As a workaround use evaluate=FALSE argument to update and
evaluate it yourself fetching the environment from the innards
of the lm structure:
f - function() {
DF - data.frame(y = 1:12, x1 = gl(2, 1, 12), x2 =
Perhaps the evaluate= argument could be extended to
allow an environment or an object for which
environment(object) yields an environment, e.g.
update(y ~ x2, evaluate = formula(f.lm))
On 10/10/06, Duncan Murdoch [EMAIL PROTECTED] wrote:
On 10/10/2006 1:32 PM, Martin C. Martin wrote:
Gabor
On 10/10/2006 3:53 PM, Alberto Monteiro wrote:
The following code works fine:
# g is the function that returns the square of a number
g - function(y) y^2
# f1 is a function that takes one function
# as argument, and returns another function
f1 - function(f) function(x) f(x+1) - f(x)
#
On 10/10/06, Alberto Monteiro [EMAIL PROTECTED] wrote:
The following code works fine:
# g is the function that returns the square of a number
g - function(y) y^2
# f1 is a function that takes one function
# as argument, and returns another function
f1 - function(f) function(x) f(x+1) -
dear list,
I have these hourly price data over a 20 year period. Among other things, I
want to plot them with time on the x-axis. The data is in a data frame,
head(OWI.SE.all)
Record_Number Name Condition Time_PeriodPrice
1312 WECC-OWI SouthEast All
Hi all,
I have a matrix of counts for objects (rows) by samples (columns). I aimed
for about 500 counts in each sample (I have about 80 samples) and would now
like to rarefy these down to 100 counts in each sample using simple random
sampling without replacement. I plan on rarefying several
R Users,
I have written a small simulation model in R which outputs a datafile
consisting of ending population sizes for each simulation run (year). The data
(see short data example below) is labeled by NUM (simulation run), sim (year)
and N (yearly count). After searching the help files and
Uwe Ligges wrote:
Dominique Katshunga wrote:
Can someone help interprete the error message below? i was trying to
load the package copula from the R command prompt.
Error in loadNamespace(package, c(which.lib.loc, lib.loc), keep.source =
keep.source) :
in 'copula' methods specified for
Its saying you are trying to pass a list to zoo (a data frame is a list);
however, from ?zoo we see zoo takes a first argument of:
a numeric vector, matrix or a factor.
On 10/10/06, Horace Tso [EMAIL PROTECTED] wrote:
dear list,
I have these hourly price data over a 20 year period. Among other
Does this start to do what you want?
x - NUM sim N
+ 1 1 466
+ 1 2 450
+ 1 3 473
+ 1 4 531
+ 1 5 515
+ 1 6 502
+ 1 7 471
+ 1 8 460
+ 1 9 458
+ 1 10 434
+ 2 1 289
+ 2 2 356
+ 2 3 387
+ 2 4 440
+ 2 5 457
+ 2 6 466
+ 2 7 467
+ 2 8 449
+ 2 9 387
+ 2 10 394
+ 3 1 367
+ 3 2 400
+ 3 3 476
+
Dear list,
R 2.4.0 can not work in Chinese windows. it's a bug?
Thanks!
--
Sincerely yours,
Liu, jcheng
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
Deepayan Sarkar wrote:
# f1 is a function that takes one function
# as argument, and returns another function
f1 - function(f) function(x) f(x+1) - f(x)
# h(x) is g(x+1) - g(x) or 2x + 1
h - f1(g)
h
function(x) f(x+1)-f(x)
environment: 0264BE84
Presumably, 'f' takes the value 'g' in
Hello All,
I am Fuad from Indonesia. I am doing a research using R. I need to access R
from Java.
Here are my computer specifications :
1. Windows XP
2. Java 1.4.0
3. R 2.2.1
4. rJava_0.4.3.zip ; I download the binary from CRAN
5. Rserve_0.4 ; I download
On 10/10/2006 8:30 PM, liu, jcheng wrote:
Dear list,
R 2.4.0 can not work in Chinese windows. it's a bug?
Yes, the translations were mislabelled. R-patched fixes it.
Duncan Murdoch
__
R-help@stat.math.ethz.ch mailing list
Hi,
I have the following data and there is no binary operator contained,
however, I still receive the error message when running unitrootTest
function, could someone give me a guidance on it??
readClipboard()
[1] 245246261.5 275.5 307284.5 289313.5
323.75 334 312.5 325
On Tue, 2006-10-10 at 22:35 -0400, Yulei Gong wrote:
Hi,
I have the following data and there is no binary operator contained,
however, I still receive the error message when running unitrootTest
function, could someone give me a guidance on it??
readClipboard()
[1] 245246261.5
Hi all,
I am trying to do fitting of large sets of timeseries data, and error
messages derail the process when I encounter a dataset that doesn't fit. I'd
like to ignore those misfits and try another equation or move to the next
dataset. Any ideas? (piece of code below)
Thanks,
See ?try or ?tryCatch. The basic idiom is given here:
https://stat.ethz.ch/pipermail/r-help/2005-May/072035.html
On 10/10/06, Warren [EMAIL PROTECTED] wrote:
Hi all,
I am trying to do fitting of large sets of timeseries data, and error
messages derail the process when I encounter a dataset
Hi all
my apologies if above title is misleading, but here is my problem anyways:
I need to evaluate an integral n times. Since I can't get my head around
vectorization as of yet, I have coded it up in a loop, i.e.:
for (i in 1:n)
{
z[i] - integrate(dnorm,x[i],Inf)
}
Since n is
I've had good luck with Rserve. http://stats.math.uni-augsburg.de/Rserve/
Hope this helps,
Matt
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of fuad
Sent: Tuesday, October 10, 2006 9:58 PM
To: R-help@stat.math.ethz.ch
Subject: [R] Accessing R from Java
I'm trying to write a small function (below) to compute Box Cox
transformations of x for arbitrary values of lambda. I'd like to
specify a range of values for lamba (min,max,step) and am having trouble
getting the for loop to work. Suggestions?
Any pointers to resources for learning to
I think I have figured it out myself, would however like to know the opinion
of more experienced coders. Is this a good way of approaching this:
cumdnorm1 - function(x) {integrate(dnorm,x,Inf)}
evalvec - function(x) {lapply(x,cumdnorm1)}
It does return the desired result.
Tobias wrote:
Howdy Gurus !
I have a different correlation result from the same data. The corridor1
string variable is expressed
as a number like the corridor2 number variable.
--
levels(corridor1)
[1] A B C D E F
Or just:
lapply(x, integrate, f = dnorm, upper = Inf)
On 10/11/06, Tobias [EMAIL PROTECTED] wrote:
I think I have figured it out myself, would however like to know the opinion
of more experienced coders. Is this a good way of approaching this:
cumdnorm1 - function(x)
Hi
I am not experienced in Matlab and from your explanation I do not
understand what exactly do you want. It seems that you want randomly
choose a sample of 100 rows from your martix, what can be achived by
sample.
DF-data.frame(rnorm(100), 1:100, 101:200, 201:300)
DF[sample(1:100, 10),]
If
79 matches
Mail list logo