Hi Jose,
If you are only interested in the expected duration, the problem can be solved
analytically - no simulation is needed.
Let P be the probability to get total.capital (and then 1-P is the probability
to loose all the money) when starting with initial.capital. This probability P
is well
Your code is pretty much unreadable -- no spaces, not properly indented.
Please see `Writing R Extensions' about how to prepare legible code. (If
you want free consultancy, your potential helpers do expect this from
you.)
But I am prety sure that neither do.call() nor the for() loop are
Try this:
x - 1
z - as.name (x)
eval (call (-, z, call (attr-, z, foo, bar)))
x
[1] 1
attr(,foo)
[1] bar
On 15 авг, 06:35, Abiel Reinhart [EMAIL PROTECTED] wrote:
I would like to use a text string to get a reference to an object whose name
is the text string. I have seen people using get() for
On Thu, 2008-08-14 at 16:12 +0100, Abigail McQuatters-Gollop wrote:
Hi,
I am looking at the effects of two explanatory variables on chlorophyll.
The data are an annual time-series (so are autocorrelated) and the
relationships are non-linear. I want to account for autocorrelation in
my
Hello all,
I have a data frame in R, imported from an excel file in Swedish. The original
file contains several columns that have special characters, such as \¨{a},
\¨{o}, and so on. After import such special characters are represented in the
data frame by \\345, \\366 etc (don't ask me why).
Try this:
gsub(345, a, H\\345rkan)
But see:
cat(H\345rkan\n)
On Fri, Aug 15, 2008 at 6:54 AM, Yingfu Xie [EMAIL PROTECTED] wrote:
Hello all,
I have a data frame in R, imported from an excel file in Swedish. The
original file contains several columns that have special characters, such
You've not told us the 'at a minimum' information requested in the posting
guide. What OS? What locale? And how did you 'import'?
But here's a guess. If you change \\345 to \345, it should render
correctly in a Latin-1 locale:
H\345rkan
[1] Hårkan
If this a UTF-8 locale, convert it
Hi,
I was wondering if there's a way in R to open a web browser (such as
Internet Explorer, or Firefox or whatever).
I'm doing some analyses that have associated urls, and it would be
nice to have the ability to directly open the relevant page from
within R.
I was looking at the help for
R2.7.1, WinXP
Hi,
I have a polygon inside a circle as follows:
radius - 3
x - seq(-radius,radius,length=2000)
y - sqrt(radius^2-x^2)
xx - c(x,-x)
yy - c(y,-y)
plot(xx,yy, xlim=c(-radius,radius),ylim=c(-radius,radius), type=l,
ylab=, xlab=, axes=F)
radius - 2.7
x1 -
Hi,
When I create an environment object with new.env() and populate it with
values then how can I save it into an .RData file properly, so it can be
loaded later on in a new session?
Saving an environment object with save() or save.image() results in an error
message when loading again:
Error:
I couldn't resist, either...
From: Henrik Bengtsson
Hmm,
couldn't resists:
X - NA
is.logical(X)
[1] TRUE
(X == TRUE)
[1] NA
==.MaybeNA - function(e1, e2) { !is.na(e1) (e1 == e2) }
X - structure(NA, class=MaybeNA)
is.logical(X)
[1] TRUE
(X == TRUE)
[1] FALSE
Ta da
Dear useRs,
I'm trying to estimate the proportion of individuals with a without a certain
recurring ailment at several times points. The data are of the survival type,
with start-stop dates and whether the individual had the ailment in that
interval.
Some cases are observed until database
browseURL()
On Fri, Aug 15, 2008 at 3:55 AM, [EMAIL PROTECTED] wrote:
Hi,
I was wondering if there's a way in R to open a web browser (such as
Internet Explorer, or Firefox or whatever).
I'm doing some analyses that have associated urls, and it would be nice to
have the ability to
On Fri, 15 Aug 2008, Benjamin Otto wrote:
Hi,
When I create an environment object with new.env() and populate it with
values then how can I save it into an .RData file properly, so it can be
loaded later on in a new session?
Saving an environment object with save() or save.image() results in
Jose,
I think shell.exec should do what you want:
shell.exec(http://www.yahoo.com;)
-Christos
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Friday, August 15, 2008 6:56 AM
To: r-help@r-project.org
Subject: [R]
Thanks to Prof. Ripley and Henrique, gsub does do the job. In addition, we can
use like gsub(345,aa, the column of the data frame) to replace all such
characters in this column.
By the way, I am using Windows Vista, R 2.6.1, in Sweden. As for the \\345
instead of \345, that is because, for
Benjamin Otto wrote:
Hi,
When I create an environment object with new.env() and populate it with
values then how can I save it into an .RData file properly, so it can be
loaded later on in a new session?
Saving an environment object with save() or save.image() results in an error
message when
Hi,
is there a specific/appropriate function/package to perform post hoc tests
when running a two way repeated measures anova? I'm looking for something
that will be equivalent to the 'TukeyHSD()' for between subjects anova (with
'aov()'). For one way repeated measures anova, the
If anybody is interested (maybe not :-)): finally I found a workaround:
reinstalling R (in my case building R-devel from source) and then run
update.packages(). But what exactly was the problem remain mystery (for me).
Have a nice day folks
tomas
Tomas Lanczos wrote:
Hello everybody,
it
Fantastic! That's perfect.
how didn't I find that???
Thank you!
Jose
Quoting Henrique Dallazuanna [EMAIL PROTECTED]:
Use browseURL:
browseURL('about:blank')
On Fri, Aug 15, 2008 at 7:55 AM, [EMAIL PROTECTED] wrote:
Hi,
I was wondering if there's a way in R to open a web browser
Hi Erik,
Yes this is what I was trying and your example or the one of luke is working
fine with me.
So now I'm not sure if this is due to an environment which takes too much
space. The environment troubling me has 644276 entries. Is this too much?
Benjamin
-Ursprüngliche Nachricht-
Is there any way to increment the loop when the error occurs, returning an NA
in the results matrix. I have included an if starement to only calculate
cor() when columns are !all(is.na()), but I still exit out with this error,
albeit after some loops through the matrix - i.e. when the condition
Hi everyone,
I'm trying to calculate correlation coefficients between corresponding
columns in two matrices with identical dimensions but different data. The
problem is that the matrices contain NAs in different locations. I am using
the following code to try to calculate correlations between
Of course you said when you load it again. I just now loaded it,
without error.
FYI, my sessionInfo(), which I realize is not the latest version.
sessionInfo()
R version 2.7.0 (2008-04-22)
i686-pc-linux-gnu
locale:
Not so in general, so we need the details asked for in the posting guide,
including a reproducible example. (Environments get saved all the time:
they are a fundamental part of R's operations.)
On Fri, 15 Aug 2008, Benjamin Otto wrote:
Hi,
When I create an environment object with new.env()
Jurica Brajković wrote:
Hello,
I am struggling for some time now to estimate AR(1) process for commodity
price time series. I did it in STATA but cannot get a result in R.
The equation I want to estimate is: p(t)=a+b*p(t-1)+error
Using STATA I get 0.92 for a, and 0.73 for b.
Code that
Running R version 2.6.1 under Linux, I'm trying to use the maps and
mapdata packages and the state database to produce a thematic map of the
USA. My problem is that cracks (white spaces) appear between some
states--e.g. between Colorado and Utah and between Michigan and Indiana.
The resulting
Hello,
I am attempting to run a bootstrap on a data frame, but something is going
wrong.
I have 2 data frames:
AB
V1 V2 V3V1 V2 V3
1 1471 10 13 16
2 2582 11 14 17
3 3693 12 15 18
Over
Hi everybody,
I'm having a problem with connecting to my MySQL database.
Each time I try to connect
library(RMySQL)
m - dbDriver(MySQL)
con - dbConnect (m, host=my_host,username=my_username,
password=my_password, dbname=name_of_db)
it says
Fehler in mysqlNewConnection(drv, ...) :
RS-DBI
If this is Windows, see shell.exec. On any platform, see browseURL.
Does help.search(url) not get you there?
On Fri, 15 Aug 2008, [EMAIL PROTECTED] wrote:
Hi,
I was wondering if there's a way in R to open a web browser (such as Internet
Explorer, or Firefox or whatever).
I'm doing some
Thanks to everyone who replied to me, both on and off-list.
Indeed, searching for url alone finds 'browseURL' and the very
interesting 'shell.exec'... I must have had a fuzzy moment because I
did not see it when I first looked, but yes, there they are!
So, apologies for asking something
Dear List:
I am working to understand some differences between the results of the
svymean() function in the survey package and from code I have written
myself. The results from svymean() also agree with results I get from
SAS proc surveymeans, so, this suggests I am misunderstanding something.
Hi,
I am trying to use a non linear regresion form like: f(x) ~
fmax*(1-exp(-a*(x-c)).
nls.NEE.fill - nls(NEE ~ -NEE.max*(1-exp(-alpha*(PAR-I))),
start=list(NEE.max=-25,alpha=5,I=20))
I have given random values to a and c (alpha and I). But it gives my an error:
Error in
See the Object class in the R.oo package. /Henrik
On Thu, Aug 14, 2008 at 7:35 PM, Abiel Reinhart [EMAIL PROTECTED] wrote:
I would like to use a text string to get a reference to an object whose name
is the text string. I have seen people using get() for this purpose, but as
far as I can tell
ComRades:
I am geeting the error message
Error in ldots[[which(MET)]] : attempt to select less than one element
when I try to fit the geostatistical model with the likfit() function of
geoR.
I have tried with old data for which likfit() successfully maximised the
likelihood in previous versions
Marc Moragues Canela marc.moragues at gmail.com writes:
I am trying to do the randomization of several field experiments using a
row/column design. I found some functions in the past, but I do not remember
what package it was and don't seem to find it again
Package AlgDesign might do what you
Roger Leenders r.t.a.j.leenders at rug.nl writes:
I have a polygon inside a circle as follows:
.. Example code removed (but it's nice you included it)
(the graph much resembles a speed dial inside a car).
Now I want to fill the polygon with color, such that it starts on the
left with red
Having been told that this was a particular very large environment, Luke's
comments in serialize.c wouild seem to apply:
The output format for dotted pairs writes the ATTRIB value first
rather than last. This allows CDR's to be processed by iterative
tail calls to avoid recursion
Dear R-users,
Could someone please explain why the message printed by function stopifnot2,
see below, is different from that of stopifnot itself?
Thank you for your help,
Vadim
stopifnot2 - function(...) stopifnot(...)
stopifnot(F)
Error: F is not TRUE
stopifnot2(F)
Error: ..1 is not TRUE
I was having a problem with a little simple function I wrote in R and I think
the problem was that R is representing fractional numbers in binary floating
point and not decimal notation, so sometimes I was having extra data points
counted. Is there a way to cast a number stored in a variable as
Hello,
I slightly altered your code, but I hope that's what you want:
l - 1000
radius - 3
x - seq(-radius,radius,length=l)
y - sqrt(radius^2-x^2)
xx - c(x,-x)
yy - c(y,-y)
plot(xx,yy, xlim=c(-radius,radius),ylim=c(-radius,radius), type=l,
ylab=, xlab=, axes=F)
radius - 2.7
x1 -
Hi Aiste,
Thank you. It may be slow, but it is exactly what I was looking for! I'd
be interested if anyone has a faster solution, but this already does the
trick well.
Of course there will be additional elements in the figure, but it is the
coloring I was struggling with.
thanks, Roger
Fedora 9
R 2.7.1
I tried to install R on my Linux system using
install.packages(Rcmdr, dependencies=TRUE).
I received many, many, many error messages. I hope someone can suggest a
fix.
The output from warnings()
is listed below. A more detailed list of errors from one of the failed
Roger Leenders [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Now I want to fill the polygon with color, such that it starts on the left
with red and ends on the right with green, following the coloring of the
rainbow.
I'd recommend using polar coordinates, like shown below.
Am 15.08.2008 um 14:00 schrieb Roger Leenders:
I can draw the polygon as above, but I don't know how to do the
coloring. It is easy to give the polygon only one color (e.g. through
polygon(c(x1,x2),c(y1,y2), col=red)), but I need a way in which to
color the polygon such that the color moves
Hi there! I can't find any information about creating combinations
with repetitions in R. The function combn() does create combinations,
but _without_ repetitions.
Here is what I need to do:
svIter - 1000
xx - matrix(rnorm(m*n), c(m, n))
sequence - seq(range(xx)[1], range(xx)[2],
On Fri, 15 Aug 2008, Prof Brian Ripley wrote:
Having been told that this was a particular very large environment, Luke's
comments in serialize.c wouild seem to apply:
The output format for dotted pairs writes the ATTRIB value first
rather than last. This allows CDR's to be processed by
what is the problem?
A solution is:
plot(1,2, ylab=expression(paste(insects , m^2)))
The problem is very much more difficult to determine.
stephen sefick wrote:
plot(1,2, ylab= paste(insects, expression(m^2), sep= ))
I get insects m^2
I would like m to the 2
what is the problem?
Dear List:
(reposting due to word wrap problems, my apologies)
I am working to understand some differences between the results of the
svymean() function in the survey package and from code I have written
myself. The results from svymean() also agree with results I get from
SAS proc surveymeans,
Dear all,
I am plotting a scatter plot for a large sample (1e+05 ordered pairs).
This produces a large (~5MB) file in a pdf or postscript terminal, and
I am wondering whether there are methods for reducing the size of the
resulting file so that it is easier to include it in a document. I'd
rather
Have you tried using pch='.'?
Also you might consider using 'hexbin' for creating the scatter plot.
On Fri, Aug 15, 2008 at 12:24 PM, Nazareno Andrade
[EMAIL PROTECTED] wrote:
Dear all,
I am plotting a scatter plot for a large sample (1e+05 ordered pairs).
This produces a large (~5MB) file
On Fri, 15 Aug 2008, Vadim Organovich wrote:
Dear R-users,
Could someone please explain why the message printed by function stopifnot2,
see below, is different from that of stopifnot itself?
Refer to the source
page(stopifnot,'print')
Then consider this:
foo - function(...)
solution
plot(1,2, ylab= expression(insects* *m^2))
On Fri, Aug 15, 2008 at 12:26 PM, stephen sefick [EMAIL PROTECTED] wrote:
plot(1,2, ylab= paste(insects, expression(m^2), sep= ))
I get insects m^2
I would like m to the 2
what is the problem?
--
Let's not spend our time and resources
Keeping Gavin's advice in mind, you may also want to look at ?acf (and
see section 14.1 of MASS) and help(ACF, package=nlme) (see section 5.3
of MEMSS). These are useful functions for exploring the 1d empirical
autocorrelation structure of model residuals.
hth,
Kingsford Jones
On Fri, Aug 15,
Hey list!
I have a csv-file with two variables: (Date,CMI)
Date,CMI
Jan-93,3.24
Feb-93,-2.56
.
.
.
Dec-06, 8.25
When I want to plot this dataset, R is sorting the date in alphabetical
order. Is there any way to tell R not to do it?
I know it is probably an easy issue but I couldn't find a
you could use something like the following:
expand.grid(rep(list(1:3), 4))
I hope it helps.
Best,
Dimitris
Jose Luis Aznarte M. wrote:
Hi there! I can't find any information about creating combinations
with repetitions in R. The function combn() does create combinations,
but _without_
On Fri, Aug 15, 2008 at 6:43 AM, Benjamin Otto
[EMAIL PROTECTED] wrote:
Hi Erik,
Yes this is what I was trying and your example or the one of luke is working
fine with me.
So now I'm not sure if this is due to an environment which takes too much
space. The environment troubling me has
Harold,
in design-based estimation, thinking in terms of what is my
(effective) sample size rarely works out.
First of all, unless you have a fixed sample size design, your sample
size itself is a random variable. You can hope for fixed sample sizes
with some excruciatingly controlled clinical
On Fri, 15 Aug 2008, Jose Luis Aznarte M. wrote:
Hi there! I can't find any information about creating combinations with
repetitions in R. The function combn() does create combinations, but
_without_ repetitions.
Here is what I need to do:
svIter - 1000
xx - matrix(rnorm(m*n), c(m, n))
Hi Luke, hi all,
You have been right guys, the hashing solved the problem. Thanks for your
hard efforts. :)
Best regards
Benjamin
-Ursprüngliche Nachricht-
Von: Luke Tierney [mailto:[EMAIL PROTECTED]
Gesendet: Friday, August 15, 2008 6:29 PM
An: Prof Brian Ripley
Cc: Benjamin Otto;
Jim,
Thanks for the answer. Using pch=. reduces the file to ~3MB... Still large.
I'll look into hexbins, but if I understand it right, it would 'round'
points which are nearby into a same hexagon, right? Couldn't that
result in an inaccurate view of a scatter plot?
Here's the code I'm using:
Hi,
I have got a problem with running WinBugs from R.
Following WinBugs project recommendations for Vista Microcoft, I
installed my Winbugs software at C:\ (not at C:\Program Files).
However, when I run the attached code in R, R still looks for Winbugs
at C:\Program Files and ends up in numerous
I'm writing a C++ application using R-embedding to do some
forecast process.
I also use R_tryEval instead of R_Eval to run my R-script,
so that in case of error I know exactly in which line number
was the last error.
In particular, from time in time y get some error messages
refering an
faq 7.31
On Fri, Aug 15, 2008 at 9:16 AM, Amanda1988 [EMAIL PROTECTED] wrote:
I was having a problem with a little simple function I wrote in R and I think
the problem was that R is representing fractional numbers in binary floating
point and not decimal notation, so sometimes I was having
Schreiber, Stefan Stefan.Schreiber at ales.ualberta.ca writes:
Hey list!
I have a csv-file with two variables: (Date,CMI)
Date,CMI
Jan-93,3.24
Feb-93,-2.56
.
.
.
Dec-06, 8.25
When I want to plot this dataset, R is sorting the date in alphabetical
order. Is there any way
Nazareno Andrade nazareno at lsd.ufcg.edu.br writes:
Jim,
Thanks for the answer. Using pch=. reduces the file to ~3MB... Still large.
I'll look into hexbins, but if I understand it right, it would 'round'
points which are nearby into a same hexagon, right? Couldn't that
result in an
On Fri, Aug 15, 2008 at 6:15 PM, John Sorkin
[EMAIL PROTECTED] wrote:
Fedora 9
R 2.7.1
I tried to install R on my Linux system using
install.packages(Rcmdr, dependencies=TRUE).
I received many, many, many error messages. I hope someone can suggest a
fix.
The output from warnings()
is
Try this:
plot(1,2, ylab=expression(insects~m^2))
On Fri, Aug 15, 2008 at 1:26 PM, stephen sefick [EMAIL PROTECTED] wrote:
plot(1,2, ylab= paste(insects, expression(m^2), sep= ))
I get insects m^2
I would like m to the 2
what is the problem?
--
Let's not spend our time and resources
It rather sounds like you might be designing a gauge display for a
dashboard. If that's the case, I'd recommend checking out:
Information Dashboard Design: The Effective Visual Communication of Data
Stephen Few
http://www.amazon.com/dp/0596100167
as well as some of his online writings:
Jim,
Thanks for the answer. Using pch=. reduces the file to ~3MB... Still large.
I'll look into hexbins, but if I understand it right, it would 'round'
points which are nearby into a same hexagon, right? Couldn't that
result in an inaccurate view of a scatter plot?
Here's the code I'm using:
Dear All,
I want to extract the original dataset from a lm output. I know that I
can get most of it from
model.matrix(lm.out)
but I need the dependent variable to be in the first column. Any ideas?
Thanks,
Kyle Roberts
__
R-help@r-project.org
Thank you, Stas. This is helpful. A few thoughts.
1) In this linearization, I do treat N (population) size as a known constant. I
thought that is what svymean() and SAS proc surveymeans did as well. So, this
is a simple univariate expansion since I only take the derivative w.r.t to Y,
the
Try change the bugs.directory argument in bugs function:
AR1bugs.sim - bugs(data, inits, parameters, D:AR1GammaModel.txt,
n.chains=3, n.iter=1000,bugs.directory=c:/WinBUGS14/,
working.directory=NULL, clearWD=TRUE, debug=TRUE)
On Fri, Aug 15, 2008 at 1:54 PM, Yevhen Yankovskyy [EMAIL
Here are a couple of other solutions, use whichever works best for you (after
modifications, changing increments, etc.).
radius - 3
x - seq(-radius,radius,length=2000)
y - sqrt(radius^2-x^2)
xx - c(x,-x)
yy - c(y,-y)
plot(xx,yy, xlim=c(-radius,radius),ylim=c(-radius,radius), type=l, ylab=,
Check out the zoo package:
Lines - Date,CMI
Jan-93,3.24
Feb-93,-2.56
Dec-06, 8.25
library(zoo)
z - read.zoo(textConnection(Lines),
FUN = as.yearmon, format = %b-%y,
sep = ,, header = TRUE)
plot(z)
On Fri, Aug 15, 2008 at 1:12 PM, Schreiber, Stefan
[EMAIL PROTECTED] wrote:
Hey list!
I
Thanks for the suggestions. I needed it to be a little more generic to capture
lm models where the dataset may or may not have been attached. Also, if they
specified any interaction effects, I needed to capture them, so model.frame
wouldn't work. With Henrique's help, I did this:
John Sorkin wrote:
Fedora 9
R 2.7.1
I tried to install R on my Linux system using
install.packages(Rcmdr, dependencies=TRUE).
I received many, many, many error messages. I hope someone can suggest a
fix.
Looks like you forgot to install the R-devel package. (And yes, the
error messages
Thank you very much Charles!
I probably should stop passing the dots to subfunctions and rather doctor the
results of as.list(match.call()), e.g.
mc - as.list(match.call())
mc[[1]] - stopifnot
eval(as.call(mc))
This looks safer.
Thanks again,
Vadim
Try this:
lm.out$model
On Fri, Aug 15, 2008 at 4:48 PM, Roberts, Kyle [EMAIL PROTECTED] wrote:
Dear All,
I want to extract the original dataset from a lm output. I know that I
can get most of it from
model.matrix(lm.out)
but I need the dependent variable to be in the first column. Any
try this:
x1 - rnorm(30)
x2 - rnorm(30)
x3 - rnorm(30)
y - 0.5 + x1 - 2*x2 + 3*x3 + rnorm(30)
fm - lm(y ~ x1 + x2 + x3)
model.frame(fm)
I hope it helps.
Best,
Dimitris
Roberts, Kyle wrote:
Dear All,
I want to extract the original dataset from a lm output. I know that I
can get most of it
The problem was solved by specifying resolution=0 in the map() function.
Would that saving the union had always been so easy and bloodless.
-John
John P. Burkett wrote:
Running R version 2.6.1 under Linux, I'm trying to use the maps and
mapdata packages and the state database to produce a
Look at:
library(fortunes)
fortune(69)
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rolf Turner
Sent: Thursday, August 14, 2008
Dear all,
I'm using adaBoost from the ada package to build a classification
model. After training the model in R I'd like to use it in a
Python application. Is it possible to export the model in some
way to make translating into python easier?
Any help would be greatly appreciated. Thanks.
I thought running it through latex will compress the pdf - but this post nicely
summarizes some options:
http://tolstoy.newcastle.edu.au/R/e2/help/07/05/17475.html
I personally prefer the pdftk approach* over the ghostscript option** as the
latter seems to give me a number of problems on
On 8/15/08, Doran, Harold [EMAIL PROTECTED] wrote:
1) In this linearization, I do treat N (population) size as a known
constant. I thought that is what svymean() and SAS proc surveymeans did as
well. So, this is a simple univariate expansion since I only take the
derivative w.r.t to Y, the
Paul,
I installed R-devel as root, and then re-tried to install R-cmdr as a
regular users. Unfortunately I still receive multiple error messages.
Any suggestions? I have pasted on set of error messages below:
* DONE (multcomp)
* Installing *source* package 'party' ...
** libs
gcc -m32 -std=gnu99
Hi,
I am having trouble getting Cairo properly installed for R. The details (what I
tried, what I got, and my system info) are below. Any ideas would be
appreciated.
Hugh Rand
How I tried to install it:
install.packages('Cairo',,'http://www.rforge.net/')?
What the message was:
*
John,
I am not sure whether the following solves the problem, but you could try it:
yum install gcc-gfortran
Best,
Paul
On Fri, Aug 15, 2008 at 10:02 PM, John Sorkin
[EMAIL PROTECTED] wrote:
Paul,
I installed R-devel as root, and then re-tried to install R-cmdr as a
regular users.
Along the lines of Gabor's method, presumably you could put a spare
argument in your function:
foo- function(x,help=FALSE,...)
{
helpout-c(comment,
comment,
end of comments)
if(something_is_wrong_with_inputs || help=TRUE)
{
print(helpout)
stop #or trycatch, or whatever
Not that I know of. However, remember, the RAM format is just a matrix.
It's fairly simple to write some code to scan through and make changes to
models. For example, here's something to delete a specified path. It
should be fairly simple to run through a set of paths, delete them
piecewise,
Dear Dr. Ripley,
Thank you very much for your comments concerning do.call and call. Obviously,
until this week I was fully unaware of the existence of both functions. I
changed the following code
x-do.call(method,methodArgs)
into
x-call(method,Path)
eval(x)
and after deleting
Hi,
I'm sure this is pretty straightforward, but I cant seem to figure it
out after playing around with grid, and a number of other packages for
graphing
I have data of the following type (much larger of course, and in this
case is named Medoid4). The first column defines the x-axis, while
Barry Rowlingson wrote:
2008/8/12 Aiste Aistike [EMAIL PROTECTED]:
Hello,
I have a problem with using read.csv(). I want to read a table from the ONS
neighborhood statistics website which has an address:
[snippage]
There's also bits of JavaScript and other cruft in there. I can't
I have lots of data that needs to be viewed as a histogram, and I've
found the multhist package to work quite nicely--for the most part.
The only problem is that I can't figure out a way to get the x-axis to
make any logical sense. I have a data set with exactly 26 different
values, but
Thanks for steering me in the right direction!
However, I did it slightly different:
require(zoo)
x - yearmon(1993 + seq(0, 167)/12)
plot(mydata$CMI~x)
Thanks!
Stefan
-Original Message-
From: Gabor Grothendieck [mailto:[EMAIL PROTECTED]
Sent: Friday, August 15, 2008 2:06 PM
To:
Hi Dennis, you could get the result using 2 approachs:
1)
a - c(1,1,1,1,2,3,4,5,5)
b - table(a)
print (b[1])
1
4
Now,
print (b[[1]])
4
rownames(b)
[1] 1 2 3 4 5
c =rownames(b)
print(c[1])
1
2)
b= tabulate(a)
b
[1] 4 1 1 1 2
print(b[1])
[1] 4
Emir Toktar
-Original
Note that this works:
y - rnorm(168)
z - zooreg(y, start = as.yearmon(1993), freq = 12)
plot(z)
and this also works and does not require zoo but
won't automatically put ticks on the months:
tt - ts(y, start = 1993, freq = 12)
plot(tt)
On Fri, Aug 15, 2008 at 7:13 PM, Schreiber, Stefan
[EMAIL
Christiane Reuter wrote:
Hi everybody,
I'm having a problem with connecting to my MySQL database.
Each time I try to connect
library(RMySQL)
m - dbDriver(MySQL)
con - dbConnect (m, host=my_host,username=my_username,
password=my_password, dbname=name_of_db)
it says
Fehler in
All,
I am storing a string of email addresses in a table and when I retrieve
them using a RODBC statement such as:
test = sqlQuery(xf, select specialist from
roger_sector_specialist)$specialist
'test' is of mode list and includes a bunch of white space. As a
work-around I convert 'test' to a
Hello,
In SPSS, a multiple regression can be conducted by inputting the means,
standard deviations, sample size, and correlation matrix without actually using
the raw dataset. Is it possible to do the same in R?
Thanks in advance for your assistance.
Linda
[[alternative HTML
1 - 100 of 107 matches
Mail list logo