Is there a performance advantage to doing this, as opposed to growing
the vector within the loop? I suppose R could have to dynamically
reallocate memory at some point?
Alan
2010/5/30 Uwe Ligges :
>
>
> On 26.05.2010 08:52, Alan Lue wrote:
>>
>> Come to think of it, we can
; Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>>
>> You might want to investigate the 'data.table'
>> package.
>>
>> On 30/05/2010 09:03, Alan Lue wrote:
>>
>>>
>>> > I'm interested in using a data frame
0.002720434
Then I'd like to be able to quickly retrieve the "value" of "key" 1.5
to get -0.53. How would one go about doing this?
Yours,
Alan Lue
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
P
ng guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
> ______
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do rea
Come to think of it, we can't save the output of each invocation and
concatenate it later, since we need the output as input for the next
iteration.
Alan
On Tue, May 25, 2010 at 11:43 PM, Alan Lue wrote:
> Since `for' loops are slow in R, and since `apply' functions a
Since `for' loops are slow in R, and since `apply' functions are
faster, I was wondering whether there were a way to use an apply
function—or to otherwise avoid using a loop—when iterating over a
statement that updates its input.
For example, here's some such code:
r.seq <- 2 * (1 / d$Dt[1] - 1)
Those are great solutions. Thanks so much for your help.
Yours,
Alan
On Sun, Apr 25, 2010 at 11:43 AM, David Winsemius
wrote:
>
> On Apr 25, 2010, at 2:22 PM, Chuck Cleland wrote:
>
>> On 4/25/2010 2:10 PM, Alan Lue wrote:
>>>
>>> Hi,
>>>
>>&
Sorry -- I meant `v(end)' and `v[length(v)]' in the first examples of
my message.
Alan
On Sun, Apr 25, 2010 at 11:10 AM, Alan Lue wrote:
> Hi,
> Is there a way to specify the last element of a vector, similar to "end" in
> MATLAB?
> v[end]
> would be
r the first and last? (I know you can achieve this using two
lines, but I'm writing because I want to do it using one.)
Alan
--
Alan Lue
Master of Financial Engineering
UCLA Anderson School of Management
[[alternative HTML version deleted]]
_
Is there anyway to label axes in 3D plots with mathematical expressions?
In the code below, I want to replace "delta_yrsed" with what "\Delta
\widehat{yrsed}" represents in TeX, but the [xyz]lab parameters of title3d
appear to only accept character strings.
require("rgl")
fn.delta.yrsed <- funct
Test.
On Fri, Nov 7, 2008 at 2:40 AM, Alan Lue <[EMAIL PROTECTED]> wrote:
> I'm having trouble running `updates.packages()' and installing into a
> personal library.
>
> Setup:
> 1. .Renviron file contains: R_LIBS_USER="~/lib/R/%p-library/%v"
> 2.
I'm having trouble running `updates.packages()' and installing into a
personal library.
Setup:
1. .Renviron file contains: R_LIBS_USER="~/lib/R/%p-library/%v"
2. Hence "personal library" is: ~/lib/R/i486-pc-linux-gnu-library/2.6/
3. Library path upon starting R:
> .libPaths()
[1] "/home/johnny/li
12 matches
Mail list logo