This is an example that I have found to be very useful example, and one that
I have adapted myself:
http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=1
On Sun, Jul 25, 2010 at 6:27 PM, David Winsemius dwinsem...@comcast.netwrote:
On Jul 25, 2010, at 6:31 PM, sh...@ucar.edu wrote:
*What I want to do:
*Create a windows shortcut that will start the R gui **and**
simultaneously source a file
*What I have already tried:
*This almost works, but it's not the interactive R GUI:
R --no-save --sdi -file=C:\SomePath\example.R
These open the R GUI, but doesn't recognize -f --f
without loading anything. There is probably
something possible to get R files to open in R (either to edit or with a
source command), but I have not found it yet.
On Wed, Aug 11, 2010 at 3:37 PM, Duncan Murdoch murdoch.dun...@gmail.comwrote:
On 11/08/2010 4:13 PM, Gene Leynes wrote:
*What I want
The quick answer is to use a list.
The most simple:
outlist=list()
for (i in 1:10){
outlist[[i]] = matrix(rnorm(100), 10, 10)
}
Same example, but with naming:
outlist=list()
for (i in 1:10){
outlist[[i]] = data.frame(loop_number=i, matrix(rnorm(100), 10, 10))
}
now if you were to do
It seems like a disastrous proposition to name anything try, because try
is a key function used for error handling. Many functions use it
internally, and I don't think you'd want to risk fouling up those
mechanics! Even if it works, it's confusing to see that function being used
as a variable
I've been trying to figure out how to read in a large file for a few days
now, and after extensive research I'm still not sure what to do.
I have a large comma delimited text file that contains 59 fields in each
record.
There is also a header every 121 records
This function works well for
and then read it in?
It looks like you just want lines starting with numbers, so something like
grep '^[0-9]\+' thefile.csv otherfile.csv
should be much faster, and then you can just read in otherfile.csv using
read.csv().
Best,
Jim
Gene Leynes wrote:
I've been trying to figure
Does anyone know how to pass a list of parameters into a function?
for example:
somefun=function(x1,x2,x3,x4,x5,x6,x7,x8,x9){
ans=x1+x2+x3+x4+x5+x6+x7+x8+x9
return(ans)
}
somefun(1,2,3,4,5,6,7,8,9)
# I would like this to work:
temp=c(x3=3,x4=4,x5=5,x6=6,x7=7,x8=8,x9=9)
, Barry Rowlingson
b.rowling...@lancaster.ac.uk wrote:
On Mon, Apr 19, 2010 at 5:58 PM, Gene Leynes
gleyne...@gmail.comgleynes%...@gmail.com
wrote:
Does anyone know how to pass a list of parameters into a function?
for example:
somefun=function(x1,x2,x3,x4,x5,x6,x7,x8,x9){
ans
I find it useful to assign the histogram output to a variable and then
manipulate it myself:
For Example:
x=hist(R, freq=FALSE, breaks=10)
str(x)
x$counts/sum(x$counts)
On Wed, Dec 2, 2009 at 5:52 AM, guohao.hu...@gmail.com wrote:
Y-axis in your code is ``Counts'' irrelevant to probabilities.
I thought of your email when I ran across this link:
http://romainfrancois.blog.free.fr/index.php?post/2009/09/02/R-capable-version-of-ant
I think that you would have word your question more carefully for a longer
response.
Also, I use StatEt almost everyday. It works great with R. I have not
I thought the apply functions are faster than for loops, but my most
recent test shows that apply actually takes a significantly longer than a
for loop. Am I missing something?
It doesn't matter much if I do column wise calculations rather than row wise
## Example of how apply is SLOWER than
I should add that I'm using R 2.10.1 on a Windows 7 machine, thanks!
On Fri, Jul 9, 2010 at 3:11 PM, Gene Leynes
gleyne...@gmail.comgleynes%...@gmail.com
wrote:
I thought the apply functions are faster than for loops, but my most
recent test shows that apply actually takes a significantly
worthwhile for me to optimize, so thank you for the detailed response
and for the benchmark syntax.
On Sat, Jul 10, 2010 at 8:44 AM, Allan Engelhardt all...@cybaea.com wrote:
On 09/07/10 21:19, Duncan Murdoch wrote:
On 09/07/2010 4:11 PM, Gene Leynes wrote:
I thought the apply functions
Does anyone know how to dock graphics windows in Eclipse when using the
StatET plug-in for R?
Right now every time I make a graph it pops up as a separate window, which
takes up too much real estate.
By the way, if you have not tried the StatET thing, you should. It's really
nice, and I'm sure
This might give you some ideas:
http://addictedtor.free.fr/graphiques/thumbs.php
Some examples that jumped out at me for your application:
*Circular density estimate
*http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=121
*Wind rose diagram
I have recently discovered the playwith library, which is great for
creating complex lattice objects.
If you start with a simple lattice plot then modify it using
playwith, you can export the code to produce the spiffed up plot.
I noticed this function at the bottom of the xyplot
I have recently discovered the playwith library, which is great for
creating complex lattice objects.
If you start with a simple lattice plot then modify it using playwith, you
can export the code to produce the spiffed up plot.
I noticed this function at the bottom of the xyplot documentation in
# Just when I thought I had the basic stuff mastered
# This has been quite perplexing, thanks for any help
## Here's the example:
db1=data.frame(
olditems=c('soup','','','','nuts'),
prices=c(4.45, 3.25, 4.42, 2.25, 3.98))
db2=data.frame(
I found that it was easiest to just pull out the parts I want with an
apply loop.
Here I am regressing a bunch of equity returns on some index returns and
just keeping the coefficients:
EqCoefQ1 = apply(retEqQ1,2,
function(x) summary(lm(x~retIndexQ1))$coefficients)
On Tue, Jul 21, 2009
,..: 4 1 5 2 3
$ prices : num 4.45 3.25 4.42 2.25 3.98
Bill Venables
http://www.cmis.csiro.au/bill.venables/
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On Behalf Of Gene Leynes
Sent: Wednesday, 22 July 2009 10:39 AM
To: r-help
This may be somewhat useful, but I might have more later.
http://florence.acadiau.ca/collab/hugh_public/index.php?title=R:CheckBinFit
(the code below is copied from the URL above)
CheckBinFit - function(y,phat,nq=20,new=T,...) {
if(is.factor(y)) y - as.double(y)
y - y-mean(y)
y[y0] -
I have found the gdata library quite helpful:
library(gdata)
ll()
ll(dimensions=TRUE)
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
This is not so much a question as a contribution, but comments are welcome.
Comments:
1) thank you very much to Paul Smith in the post
https://stat.ethz.ch/pipermail/r-help/2008-March/157249.html
This is intended to build on that example with something more complex
than
a 2x2 set
Hello all, I have an optimization routine that is giving me good results,
but the results are not in the nice model format like lm. How can I get
optim results into a model so that I can use the clever 'fitted',
'residuals', and 'summary' functions?
Using optim is the only way that I was able to
Not sure what you're trying to accomplish, but I think the index values are
off. the first element of s is 1, not 0
Here's something that works:
s-rep(0,207)
s-as.vector(s)
s[0]-0
lambs=rep(rnorm(207)*1000)
for (i in 1:(length(lambs)-1)){
s[i]-s[i+1]-mean(lambs)
}
On Tue, Apr 7, 2009
Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On
Behalf Of Gene Leynes
Sent: Tuesday, April 07, 2009 12:17 PM
To: r-help@r-project.org
Subject: [R] get optim results into a model object
Hello all, I have an optimization routine that is giving me good
This sounds very similar to what I've been working on, but I'm not sure
without an example.
My solution has been to use an optimization that normalizes inside the
objective function. The betas that are provided by optim are not
normalized, however since they were normalized inside the objective
This is my first help post, hope it works!
Just check out the sample function
At the command line type:
?sample
I think it will be pretty clear from the documentation.
On Tue, Feb 17, 2009 at 9:13 PM, Esmail Bonakdarian esmail...@gmail.comwrote:
(sorry if this is a duplicate-problems with
After (too much) research, I've settled on SciTE, which is an open source
editor. I really wanted emacs to work, but the crazy keyboard shortcuts
were killing me.
For SciTE to work, it takes a little work.
First open the global options file and change #import r to import r to
enable R syntax
Have you tried running the examples?
Eg:
example(lm)
On Monday, August 10, 2009, Peng Yu pengyu...@gmail.com wrote:
Some examples in the manual are not in the context. In order to use
such examples, the users have to set up the variables in the examples.
Adding accompany scripts to the manuals
I'm also a newbie, but I've been getting loads of utility out of the grep
function and it's cousin gsub.
Using asterisks are tricky because * often means anything of any length in
a search pattern (e.g. delete *.* means delete all your files!). To find
the literal * using grep you would need to
This must be explained somewhere, but I've been searching for a couple of
hours and not found it.
What happened to ggplot? It appears to be missing on CRAN, except in the
archives.
http://cran.r-project.org/web/packages/ggplot/index.html
Has ggplot2 replaced ggplot?
I was trying to run some
I noticed that there is a newer version of Tom Short's cheat sheet than
the version currently posted on CRAN.
Personally I like the newer version, but maybe keeping the old version is
deliberate. Anyway, I was wondering if there's someone that I can notify
that can update the content.
New
It occurred to me that it would be nice to be able to save a library that I
have installed an loaded into my workspace for easy sharing. I suppose it
might not work if someone's on a different version of R, but usually since
the library is just a collection of functions, it seems plausible that
Duncan,
Makes perfect sense, thank you very much.
Gene
On Thu, Jul 21, 2011 at 10:46 AM, Duncan Murdoch
murdoch.dun...@gmail.comwrote:
On 21/07/2011 11:37 AM, Gene Leynes wrote:
It occurred to me that it would be nice to be able to save a library that
I
have installed an loaded into my
I have tried a lot of ways around this, but I can't find a way to make apply
work in a generalized way because it causes a failure whenever reduces the
dimensions of its output.
The following example is easier to understand than the question.
I wish it had a drop=TRUE/FALSE option like the [
Paul,
I agree completely. I didn't come at this with a programming background,
and I never noticed the other plot links, or understood their importance.
The plot help page was one of the first help pages I ever looked at and I
remember that It was totally confusing. In fact, help pages like
I'm not sure what you're doing... but here are some tips about the parts I
can understand.
1) you don't need to use which as much. This works fine:
stnID - stnid[!duplicated(stnid)]
2) which works within a for loop
3) Do you realize that stnID is shorter after you removed duplicates? I
LastColumn = ncol(mat)
print(mat[2,LastColumn])
}
On Wed, Jul 27, 2011 at 5:45 PM, David Winsemius dwinsem...@comcast.netwrote:
On Jul 27, 2011, at 6:22 PM, Gene Leynes wrote:
I have tried a lot of ways around this, but I can't find a way to make
apply
work in a generalized way
, the result has length 0 but not necessarily the correct dimension.
I just wish that it had an option to do return an array of dimension c(n,
dim(X)[MARGIN]) if n = 1
On Wed, Jul 27, 2011 at 8:25 PM, David Winsemius dwinsem...@comcast.netwrote:
On Jul 27, 2011, at 7:44 PM, Gene Leynes wrote
a drop=TRUE option in apply!
Thanks again,
Gene
On Thu, Jul 28, 2011 at 12:05 PM, David Winsemius dwinsem...@comcast.netwrote:
On Jul 28, 2011, at 12:31 PM, Gene Leynes wrote:
(As I mentioned in my other reply to Dennis, I think I'll stick with for
loops, but I wanted to respond
) matrix(rnorm(10 * x), ncol = x))
csfun - function(m) {
if(ncol(m) == 1L) {return(m)} else {
t(as.matrix(apply(m, 1, cumsum)))
}
}
lapply(exampGood, csfun)
lapply(exampBad, csfun)
HTH,
Dennis
On Wed, Jul 27, 2011 at 3:22 PM, Gene Leynes gleyne...@gmail.com wrote:
I have tried
be a disaster.
On Thu, Jul 28, 2011 at 2:45 PM, David Winsemius dwinsem...@comcast.netwrote:
On Jul 28, 2011, at 3:13 PM, Gene Leynes wrote:
Very clever (as usual)
It works, but since I wanted to switch the rows
and columns, which would require this:
answer.slightly.clumsy =
lapply
It seems like you have two questions, one about color rendering, and another
about making animations.
For the second question :
I've found the animation package useful in similar situations, where I want
to share results with non-R users who want a static visualization. By using
animation you
I wasn't at my normal computer yesterday, so I didn't run the example. I
thought rgl was one of those color palette generator packages. So, my
suggestion of using animation was completely off base (oops).
But I did notice two other things:
1) your color column changes from a factor to a
plot(1:10, pch=letters[1:10])
On Mon, Aug 1, 2011 at 4:44 AM, Andrew McCulloch amccu...@yahoo.co.ukwrote:
Hi,
I use R to draw my graphs. I have 100 points on a simple xy-plot. The
points are
distinguished by a third variable which is categorical with 10 levels. I
have
been plotting x
What do you think about this?
apply(data, 3, '[', indices)
On Mon, Aug 1, 2011 at 4:38 AM, Jannis bt_jan...@yahoo.de wrote:
Dear R community,
I have a general question regarding indexing in multidiemensional arrays.
Imagine I have a three dimensional array and I only want to extract on
for)
and
not to replace subsets with other values. I used them, however, to
program a
rather akward function to do that. Seems I found one of the few aspects
where Matlab actually is slightly easier to use than R.
Thanks for your help!
Jannis
On 08/01/2011 05:50 PM, Gene Leynes wrote:
What do
for your help!
Jannis
On 08/01/2011 05:50 PM, Gene Leynes wrote:
What do you think about this?
apply(data, 3, '[', indices)
On Mon, Aug 1, 2011 at 4:38 AM, Jannisbt_jan...@yahoo.de wrote:
Dear R community,
I have a general question regarding indexing in multidiemensional
arrays
is slightly easier to use than R.
Thanks for your help!
Jannis
On 08/01/2011 05:50 PM, Gene Leynes wrote:
What do you think about this?
apply(data, 3, '[', indices)
On Mon, Aug 1, 2011 at 4:38 AM, Jannisbt_jan...@yahoo.de wrote:
Dear R community,
I have a general
I'm looking for the best way to do the following:
run a set of GAM models, and then make predictions with new data.
My problem is the size of the gam model object, I would like to strip it
down to the bare minimum of information needed to apply the model to new
data. For example, if this
it as a file in base)... And there's
probably not much benefit for me to know more beyond that.
So, I'll be looking forward to 2.13!
On Tue, Mar 15, 2011 at 3:37 PM, Duncan Murdoch murdoch.dun...@gmail.comwrote:
On 15/03/2011 2:56 PM, Gene Leynes wrote:
The getSrcFilename function
, Duncan Murdoch murdoch.dun...@gmail.comwrote:
On 13/04/2011 5:20 PM, Gene Leynes wrote:
as of right now
x = function(a) print(a)
attr(x, srcref)
returns NULL in 2.13, am I doing something wrong?
There's a limitation to the debug information: it can't be attached to a
function whose
2.13.0 RC (2011-04-11 r55409)
On Wed, Mar 16, 2011 at 2:44 PM, Gene Leynes gleyne...@gmail.com wrote:
Thanks for showing me the link to the code / your response / your work in
general.
It seems that the real magic is happening in the call to the function
attributes, via the line
attr(x
Hello,
I was having trouble passing in command line options when doing an package
install earlier.
From An Introduction in R
In addition, you can
use25http://cran.r-project.org/doc/manuals/R-intro.html#fn-25options
--arch=, --no-environ, --no-init-file, --no-site-file and --vanillabetween
This is an amazing website which would definitely have what you want,
probably in many ways.
*http://www.gapminder.org/*
There are a wealth of data sources, and the GUI is very intuitive and
interesting. I encourage you to view a few samples to get an idea of what
you can do with the
are talking about? Perhaps you
can make it available for further inspection of this problem?
Uwe Ligges
On 19.04.2011 01:55, Gene Leynes wrote:
Hello,
I was having trouble passing in command line options when doing an package
install earlier.
From An Introduction in R
In addition, you
This is not mission critical, but it's bothering me. I'm getting
inconsistent results when I use the $ accessor in the gam formula
*In window #1:*
library(mgcv)
dat=data.frame(x=1:100,y=sin(1:100/50)+rnorm(100,0,.05))
str(dat)
gam(dat$y~s(dat$x))
Error in eval(expr, envir, enclos) : object
Hmmm
After reading that email four times, I think I see what you mean.
Checking for variables within particular scopes is probably one of the most
challenging things in R, and I would guess in other languages too. In R
it's compounded by situations when you're writing a function to accept
Why doesn't this work?
x = zoo(1:5, as.Date('2001-01-01')+1:5)
x[as.Date('2001-01-05')]
x[as.Date('2001-01-05')] = 0
x
I think this is especially bad because it doesn't cause an error. It lets
you do something to x, but then you can't see x again to see what it did.
[[alternative HTML
[as.Date('2001-01-05')] = 0
x
Error in dimnames(x) - dn :
length of 'dimnames' [1] not equal to array extent
Thank you for any insight
On Mon, Aug 29, 2011 at 1:53 PM, David Winsemius dwinsem...@comcast.netwrote:
On Aug 29, 2011, at 2:45 PM, Gene Leynes wrote:
Why doesn't this work
I use zoo in R 12.0)
On Mon, Aug 29, 2011 at 2:07 PM, Gene Leynes gleyne...@gmail.com wrote:
Michael,
By the way, although I replied to David's email, I was responding to you as
well. Your results were exactly what I was expecting, but I didn't get your
results.
On Mon, Aug 29, 2011
correctly on my machine..)
Michael Weylandt
On Mon, Aug 29, 2011 at 2:45 PM, Gene Leynes gleyne...@gmail.com wrote:
Why doesn't this work?
x = zoo(1:5, as.Date('2001-01-01')+1:5)
x[as.Date('2001-01-05')]
x[as.Date('2001-01-05')] = 0
x
I think this is especially bad because it doesn't cause
(although I don't get
the warning zoo was built under R 13.1 warning when I use zoo in R 12.0)
On Mon, Aug 29, 2011 at 2:07 PM, Gene Leynes gleyne...@gmail.com wrote:
Michael,
By the way, although I replied to David's email, I was responding to you
as well. Your results were exactly what I
On the Mac it's pretty easy to get to a USB drive by name. For example the
following command works if you have a USB drive named MYUSB
setwd('/Volumes/MYUSB')
Is there a way to do the same thing in Windows (without knowing the drive
letter)?
Thanks!
[[alternative HTML version
I wrote this function (borrowing heavily from an example from Longhow Lam)
heatplot = function(x,y,z,bgcol=#777044,coltype='heat', ccex = 1.5,
circles=TRUE, ...){
#browser()
layout(matrix(c(1, 2, 3), nc=3), widths=c(7, 1, .5))
## create the scatterplot withdifferent colors
, but the warnings (at least about not
finding drives/bad exit status) should be ignorable.
Cheers,
Josh
On Tue, Sep 6, 2011 at 2:56 PM, Gene Leynes gleyne...@gmail.com wrote:
On the Mac it's pretty easy to get to a USB drive by name. For example
the
following command works if you have a USB
Are you doing something in your profile.site file or loading a package that
masks load?
It seems that you're deparsing (or parsing, I can never remember which is
which) the literal results of the load function.
Does it work if you do this?
save(a, file='a.RData')
On Thu, Sep 8, 2011 at 12:24
searchhist = function(pattern){
histfile = tempfile()
savehistory(histfile)
myHist = readLines(file(histfile))
ret = myHist[grep(pattern, myHist)]
return(ret)
}
searchhist('data')
searchhist('^lm')
searchhist('hist')
On Thu, Sep 8, 2011 at 12:03 AM, andrewH
I thought that invisible works like return()
However, it appears that it doesn't exit a function. Is it supposed to work
this way?
funInvisible = function(){
invisible(10)
cat('I was not expecting this to print\n')
cat('because it occurs after the invisible return\n')
}
I don't understand how this function can subset by i when i is missing
## My function:
myfun = function(vec, i){
ret = vec[i]
ret
}
## My data:
i = 10
vec = 1:100
## Expected input and behavior:
myfun(vec, i)
## Missing an argument, but error is not caught!
## How is subsetting
Alan and Duncan,
or test them explicitly with missing(). If you want to do this
automatically, then you shouldn't be using substrings and deparse, you
should work at the language level. But I don't see the reason you want to
do this...
Absolutely. That wasn't the way I wanted to do it,
, 2011 at 4:33 PM, Gene Leynes gley...@gmail.com wrote:
Alan and Duncan,
or test them explicitly with missing(). If you want to do this
automatically, then you shouldn't be using substrings and deparse, you
should work at the language level. But I don't see the reason you want to
do
I think that the quietly argument in require isn't working
require('JumboShrimp', quietly=TRUE)
Warning in library(package, lib.loc = lib.loc, character.only = TRUE,
logical.return = TRUE, :
there is no package called 'JumboShrimp'
By the way, the behavior is the same with options(warn=0)
Although it could easily be user error, I never got Rpy or Rpy2 working an
any sort of reliable way.
However I did learn a couple of things about the Windows PATH
First, (as others have mentioned) it's easiest to modify the PATH through
the Windows GUI that comes up when you right click My
.
By the way, I wanted to suppress the confusing message generated by R, and
put in a simple recommendation that the user should try installing the
package.
2011/1/12 Uwe Ligges lig...@statistik.tu-dortmund.de
On 12.01.2011 18:53, Gene Leynes wrote:
I think that the quietly argument in require
That also drives me crazy!
I don't have that problem when I use the StatEt plug-in for Eclipse.
Of course, using a new IDE is a big undertaking, but I can assure you: it's
worth it! This is just one small benefit.
On Wed, Jan 12, 2011 at 4:00 PM, Feng Li m...@feng.li wrote:
Dear R,
How can
I like the zoo package, and there are several helpful examples.
library(zoo)
You can easily convert your data into a zoo object using
I was actually just doing this using this function:
LoadReturnData=function(x){
ret = read.csv(x)
ret = zoo(ret[ , -1], as.Date(ret[ , 1]))
Is it possible to toggle the edit option of a widget?
I would like to make it so that when a user clicks on a boolean (like use
constraints) it will lock or unlock the field in which they would enter the
constraints.
I can imagine redrawing the whole GUI using a function attached to the
boolean,
For the benefit of others searching the help:
I think you can change the state of widgets by using setWidgetState
see ?setWidgetState in package:PBSmodelling
-- Forwarded message --
From: Gene Leynes gleyne...@gmail.com gleynes%...@gmail.com
Date: Thu, Jan 13, 2011 at 4:30 PM
I wish I had a better answer.
There are two things that I know of that use a direct approach:
The segmentation package seems to work well if you are doing a few fits, but
I had problems when I tried running it on loads of data. It's a bit tricky
to parametrize. When I tried investigating the
oh yes, and the structchange package.
After a day of experimentation I couldn't figure out how to get the
structchange package to work for my problems. Although it is probably user
error on my part, the package seems to be specific to time series problems.
Also, I think it needed regularly
Regarding the issue of inserting a newline during debugging:
If I remember correctly, this issue didn't happen in older versions of R.
and it seems connected to some other issues.
There generally seems to be something different with how the R Console is
being rendered, and it doesn't seem to be
I one tried to write a function to do that, but it wasn't worth it / didn't
work
I found this to be a better solution:
mynames = names(sapply(mylist, names))
for(nm in mynames){
print(mylist[nm])
# or do other stuff
}
You can use browser to look inside sapply, and the objects available
Can anyone illuminate the following for me?
How can I get rid of the blue line in the key in the second plot?
## Create a simple data frame
df=data.frame(x=1:1000, y=2*1:1000+rnorm(1000,sd=1000),
type=sample(letters[1:2],1000, replace=TRUE))
## Very nice! Almost what I want
qplot(x, y,
Thank you both, very much.
Using the identity function I() is a very nice trick, but it still feels
like a trick.
Using ggplot makes the most sense to me.
ggplot(df, aes(x=x, y=y, colour=factor(type))) +
geom_point(size=1) +
geom_smooth()
Thank you very much for taking the time to
I think that people are afraid to say You can't do that in R...
But I think the real answer is: you can't do that in R.
Although, it is helpful to understand Jeff's reply. I hadn't fully
realized why this particular problem occurs before reading that. It's odd
to me that // and / are both
Here's my setup:
- I'm on a Windows machine (I don't have full admin rights)
- I have a folder with an *.RData file and an .RProfile file
- I want the user to be able to start R by double clicking on the
*.RData file
Can I specify the application start up options (like --no-save
I have had similar problems.
I have several installations of R and now I have no control over which one
opens when I try opening a RData file. The RGUI is registered more than
once, but they all have the exact same appearance in the choose programs
menu.
It's become particularly annoying now
I think the problem is that it's only a warning and not an error.
result_-list()
for(i in 1:10){
if(inherits(try(sqrt(9-i),silent=TRUE),try-error)){
#If sqrt fails
cat('fail',i,'\n')
result_[[i]]-0 } else {
#If sqrt succeeds
cat('succeed',i,'\n')
result_[[i]] -
** Disclaimer: I'm looking for general suggestions **
I'm sorry, but can't send out the file I'm using, so there is no
reproducible example.
I'm using read.table and it's taking over 30 seconds to read a tiny file.
The strange thing is that it takes roughly the same amount of time if the
file is
OR an error pop up? Any ideas?
Cheers
--
*From:* gley...@gmail.com [mailto:gley...@gmail.com] *On Behalf Of *Gene
Leynes
*Sent:* Tuesday, December 06, 2011 10:27 AM
*To:* ROLL Josh F
*Cc:* r-help@r-project.org
*Subject:* Re: [R] To Try or to TryCatch, I have tried
)).
hopefully someone else will say something that does the trick. it seems
odd to me as far as the
difference in timings ? good luck.
On Tue, Dec 6, 2011 at 1:55 PM, Gene Leynes gley...@gmail.com wrote:
Mark,
Thank you for the reply
I neglected to mention that I had already set
options
Does anyone know if Is there a way to manually install RSPython?
I get this error when I try to run the script from my DOS prompt.
V:\R CMD INSTALL -c C:/Users/gene.leynes/Downloads/RSPython_0.7-1.tar.gz
* installing to library 'C:/Users/gene.leynes/Documents/R/win-library/2.13'
* installing
For the components:
result = predict(b, type=terms)
For the total fit:
result = predict(b)
result = b$fitted.values
On Wed, Dec 7, 2011 at 3:24 AM, Mintewab Bezabih
mintewab.beza...@economics.gu.se wrote:
Dear R users,
I have now managed to fit the curve using the thin plate spline as
Possibly not the absolutely most efficient answer, but this is probably an
answer nonetheless
(David, hope I'm not encouraging bad behavior by replying.)
isp - data.frame(begin=c(1,5,6,15,31,51,102), end=c(7,9,13,21,49,52,109))
isp
ints = apply(isp, 1, function(x)seq(x[1],x[2]))
ints
ints =
, 2011 at 11:28 AM, Gene Leynes gleyne...@gmail.com wrote:
Does anyone know if Is there a way to manually install RSPython?
I get this error when I try to run the script from my DOS prompt.
V:\R CMD INSTALL -c C:/Users/gene.leynes/Downloads/RSPython_0.7-1.tar.gz
* installing to library 'C
in a heavily virus-scanned
system directory?
-pd
Michael
2011/12/7 Gene Leynes gley...@gmail.com:
Peter,
You're quite right; it's nearly impossible to make progress without a
working example.
I created an ** extremely simplified ** example for distribution. The real
data has numeric
R. Michael Weylandt michael.weyla...@gmail.com
Kopie
r-help@r-project.org, Gene Leynes gley...@gmail.com
P?edm?t
Re: [R] read.table performance
On Dec 7, 2011, at 22:37 , R. Michael Weylandt wrote:
R 2.13.2 on Mac OS X 10.5.8 takes about 1.8s to read the file
verbatim
1 - 100 of 146 matches
Mail list logo