If you look at the new file in raw mode, you'll see that it's chock full of
ASCII nuls, while the old file has none. This is probably what's giving you
the problems, because R does not allow strings containing embedded nul
characters. (I believe this is because Nul in strings is pretty dangerous in
I'm not sure what you are trying to prove with that example - the loopless
versions are massively faster, no?
I don't disagree that loops are sometimes unavoidable, and I suppose
sometimes loops can be faster when the non-loop version e.g. breaks your
memory budget, or performs tons of needless co
For loops are really, really slow in R. In general, you want to avoid them
like the plague. If you absolutely must insist on using them in large,
computationally intense and complex code, consider implementing the relevant
parts in C, say, and calling that from R.
Staying within R, you can probabl
Better yet, remove the which altogether, and it'll run a slight bit faster
and maybe look a little neater.
x <- x[x!="bobo"]
--
View this message in context:
http://r.789695.n4.nabble.com/Remove-a-number-from-a-vector-tp851865p4626413.html
Sent from the R help mailing list archive at Nabble.com.
What about using a Portable Apps style packaging of R? That might solve some
of the issues.
--
View this message in context:
http://r.789695.n4.nabble.com/registry-vulnerabilities-in-R-tp4619217p4623388.html
Sent from the R help mailing list archive at Nabble.com.
___
So, I'm maintaining some else's code, which is as always, a fun thing. One
feature of this code is the use of the 'seek' command.
In ?seek:
We have found so many errors in the Windows implementation of file
positioning that users are advised to use it only at their own
risk, and
How many data points do you have?
--
View this message in context:
http://r.789695.n4.nabble.com/What-is-the-most-cost-effective-hardware-for-R-tp4617155p4617187.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mail
the NAMESPACE file, right? The question I was wondering was what
the appropriate way to document this operator is. i.e. What should I
put in the \usage section, etc?
'Writing R Extensions' doesn't seem to see much about this, but maybe
I'm m
Oh hang on, I've figured it out.
Rounding error, doh. Somewhere along the line I got lazy and took the
weighted average of two values that are equal. as.integer truncates, so,
yeah. Never mind.
Zhou Fang
__
R-help@r-project.org mailing list
ested in a R workspace to reproduce this, email me.
This is running in R 2.9.
Zhou Fang
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provi
to me. You get a number between zero and
one out of it, with 1 the solution for constant fits. Anyone seen
anything like this, or know anything about properties? Has it got a
name?
Zhou Fang
__
R-help@r-project.org mailing list
https://stat.ethz.
n' actually does? Or what the
justification for it is? Or when it would be necessary? Is there a paper
I can look at?
And is the feature likely to emerge from 'experimental' any time soon?
Zhou Fang
__
R-help@r-project.org mailin
Thanks! That does exactly what I want. (Heck, maybe this should be
included as a default sorted alternative to ave.)
I was thinking of doing it another way using cumsums, but maybe this
method is faster.
Zhou
__
R-help@r-project.org mailing list
https:
very slow, and certainly not suited to
my problem, where Y changes and X stays the same and I need to
repeatedly recalculate the averaging of Y. Ave also does not take take
advantage of the sorting of the data.
So, is there an alternative? (Presumeably avoiding loops.)
Thanks,
Ah ha, that does work.
What do you mean it isn't robust, though? I mean, obviously linear
dependency structures in general are not stable under small
perturbations...?
Or is it that it's platform dependent?
Zhou
On Fri, Feb 6, 2009 at 2:28 PM, Peter Dalgaard wrote:
> Zhou Fang
have the QR decomposition of the original X 'for free'.
I know that it's possible to do this directly by looping over the
columns and adding them, but at the very least, a solution without
horrible slow loops would be nice.
Any ideas welc
What are you trying to do with
> for (pp in 1:pp+1){
?
Also, note that 1:rr+1 and 1:(rr+1) mean different things.
Zhou
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-proj
raphs. The
downside is that you might get lured into complacency...
Zhou Fang
PS: Your model equation isn't right. In both, we are also allowing the
intercept to vary between groups. So really you want
y = c + D.b0 + b1.x + D.b2.x
__
R-help@r-proj
raphs. The
downside is that you might get lured into complacency...
Zhou Fang
PS: Your model equation isn't right. In both, we are also allowing the
intercept to vary between groups. So really you want
y = c + D.b0 + b1.x + D.b2.x
__
R-help@r-proj
Hi all,
As a possibly silly request, is it possible to interactively pause a
R-calculation and do a browser(), say, without browser or other debug
handlers being explicitly included in the code?
Imagine the following situation:
You write up a big calculation for R to calculate. We are talking
ho
t you wish to work on and start R normally.
> No code is needed.
>
> On Mon, Jan 12, 2009 at 10:04 AM, Zhou Fang wrote:
>> Ok, looks like I can do what I want with --args, commandArgs() and an
>> appropiate .First.
>>
>> Thanks,
>>
>> Zhou
>>
>
;
> -- David Winsemius
>
> On Jan 12, 2009, at 7:24 AM, Zhou Fang wrote:
>
>> That's not really what I meant by 'command line'. I meant, well,
>> loading from e.g. a bash shell, not from within an interactive R
>> session itself.
>>
>>
te:
> See ?load
>
> On Mon, Jan 12, 2009 at 10:12 AM, Zhou Fang wrote:
>>
>> Hi,
>>
>> Is there any way to load workspaces (e.g. stuff from save.image) from
>> the command line? I'm on Linux, and would find this very helpful.
>>
>> I'm gue
ates), but I'm wondering if there's a better way.
Zhou Fang
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide comm
Hi,
Should be a quickie:
I want to make a datafile in R for plotting in gnuplot (which has
friendlier 3D plotting options, as far as I can tell). So, I want to
create a file with contents along the lines of
#File begins
0 0 10
0 13 10
0.2 2 10
1 0 10.12
1 1 5
1 2 10
2 0 10
2 1 1
2 2 10
It's p
25 matches
Mail list logo