Displaying 20 results from an estimated 2000 matches similar to: "wishlist: decreasing argument to is.unsorted"
2013 Feb 28
2
Fortune?
I think the rule is that you can do anything as long as you don't
complain. If you want to complain, you must follow the instructions.
-- Jari Oksanen in
Re: [Rd] Keeping up to date with R-devel
--
Patrick Burns
pburns at pburns.seanet.com
twitter: @burnsstat @portfolioprobe
http://www.portfolioprobe.com/blog
http://www.burns-stat.com
(home of:
'Impatient R'
'The R
2011 Sep 12
3
Solve your R problems
R-help is all about solving R problems.
So here ya go:
http://www.portfolioprobe.com/2011/09/12/solve-your-r-problems/
--
Patrick Burns
pburns at pburns.seanet.com
twitter: @portfolioprobe
http://www.portfolioprobe.com/blog
http://www.burns-stat.com
(home of 'Some hints for the R beginner'
and 'The R Inferno')
2014 Feb 06
1
suggested addition to 'install.packages' help file
I suggest that there be an additional sentence
in the explanation for the 'repos' argument in
the help file for 'install.packages':
If the repository is on a local drive, then the
string should begin with \code{file:}, e.g.,
\code{"file:J:/Rrepos"}.
Perhaps I'm missing some subtlety, but it makes
things work in my case.
Pat
--
Patrick Burns
pburns at
2014 Feb 13
1
no objects apparent in built package
Here's a weird problem that I hope someone
can give me some hints for.
Actions:
Build a package of all R functions -- no
compiled code. No indication of anything
being wrong.
'require' the newly built package.
As far as the session is concerned, there
is nothing in the package.
This is being done in RStudio on Windows
with R version 3.0.2.
The package used to work. There was
2018 Aug 05
0
Is this a bug in `[`?
This is Circle 8..1.13 of the R Inferno.
On 05/08/2018 06:57, Rui Barradas wrote:
> Thanks.
> This is exactly the doubt I had.
>
> Rui Barradas
>
> ?s 05:26 de 05/08/2018, Kenny Bell escreveu:
>> This should more clearly illustrate the issue:
>>
>> c(1, 2, 3, 4)[-seq_len(4)]
>> #> numeric(0)
>> c(1, 2, 3, 4)[-seq_len(3)]
>> #> [1] 4
2013 Feb 26
3
double bracket stripping names
Is it on purpose that `[[` strips the
names when used on an atomic vector?
> c(a=1, b=2)[1]
a
1
> c(a=1, b=2)[[1]]
[1] 1
> sessionInfo()
R Under development (unstable) (2013-02-11 r61902)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United Kingdom.1252
[2] LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C
2013 Mar 02
3
if value is in vector, perform this function
Hi,
I'm trying to set up R to run a simulation of two populations in which every 3.5 days, the initial value of one of the populations is reset to 1.5. I'm simulation an experiment we did in which we fed Daphnia populations twice a week with algae, so I want the initial value of the algal population to reset to 1.5 twice a week to simulate that feeding. I've use for loops and if/else
2013 Mar 28
2
E-learning environment for R
Hello,
Does an e-learning environment for R (in English) exist? I would like
to point out to students a way to learn R if they have missed the
course on R.
Pekka Pere
University Lecturer
University of Helsinki
2013 Apr 06
1
Value at Risk using a volatility model?
Hi,
I want to calculate the Value at Risk with using some distirbutions and a
volatility model.
I use the following data(http://uploadeasy.net/upload/cdm3n.rar) which are
losses (negative returns) of a company of approx. the last 10 years. So I
want to calculated the Value at Risk, this is nothing else than the
quantile. Since I have losses I consider the right tail of the distribution.
Consider
2013 Mar 18
4
!0 + !0 == !0 - !0
Hi all,
The subject line is TRUE.
Today I accidentally typed rnorm(!0).
My old eyes took a minute to focus clearly enough to see what I really typed and
why I got '!0' random numbers instead of '10' random normal numbers.
If the subject line is disturbing, be assured that this is TRUE:
!0^2 == !0 * !0 # ;-)
Anyway, I hope the hands who have been around long enough to know
2013 Feb 26
4
cut a vector in equal parts
Hi,
I would like to cut a vector of values in parts.
Each part should have an equal number of elements.
for example:
x <- (rnorm(500)^2)
now I want 5 vectors each with 100 elements.
The first vector should include the 100 lowest values of x and so on
(so that the fifth vector contains the 100 highest values of x).
thanks for any help!
2013 Mar 25
3
nested 'while' loops
Hi everyone,
I'm using the following code to go over every element of a data frame (row
wise). The problem I am facing is that the outer 'x' variable is not
incrementing itself, thus, only one row of values is obtained, and the
program does not proceed to the next row.
This is the code:
while(x<=coln)
{
while(y<=rown)
{
n<-as.numeric(df[[y]][x]);
2013 Mar 08
2
Unexpected behaviour of apply()
Hello everyone,
Considering the following code sample :
----
indexes <- function(vec) {
vec <- which(vec==TRUE)
return(vec)
}
mat <- matrix(FALSE, nrow=10, ncol=10)
mat[1,3] <- mat[3,1] <- TRUE
----
Issuing apply(mat, 1, indexes) returns a 10-cell list, as expected.
Now if I do:
----
mat[1,3] <- mat[3,1] <- FALSE
apply(mat, 1, indexes)
----
I would expect a
2013 Mar 12
1
rugarch: GARCH with Johnson Su innovations
Hey,
I'm trying to implement a GARCH model with Johnson-Su innovations in order to simulate returns of financial asset. The model should look like this:
r_t = alpha + lambda*sqrt(h_t) + sqrt(h_t)*epsilon_t
h_t = alpha0 + alpha1*epsilon_(t-1)^2 + beta1 * h_(t-1).
Alpha refers to a risk-free return, lambda to the risk-premium.
I've implemented it like this:
#specification of the model
2012 Apr 15
1
no carriage returns in BATCH output from 2.15.0
It seems like I must be missing something
since I haven't been able to find mention
of this.
Under Windows 7 I'm not getting carriage returns
in the output of BATCH files using 2.15.0 (both
64-bit and 32-bit). They are in the startup
messages, but not for the real output. Is this
on purpose?
Pat
--
Patrick Burns
pburns at pburns.seanet.com
twitter: @portfolioprobe
2013 Feb 27
2
temp seems ineffective in SANN (optim)
I am trying to control the behavior of the SANN method in optim (R
2.14.1) via control$temp. In my toy tests it works; in my real use, it
doesn't.
As far as I can tell my code with different temp values is loaded; I
even traced into the function that calls optim and verified temp had the
value I had set.
Could the fact that I have NaN's coming back from the objective function
be a
2013 Mar 25
2
ifelse can't return a list? Please explain (R-2.15.3)
I hope you are doing well.
For me, this was an unexpected problem. I've hoped for quite a few
wrong things today, but I'm only asking you about this one. Why does
ifelse(1, list(a, b, c), list(x, y, z))
return a list with only a, not list(a, b, c) as I hoped. I wish it
would either
cause an error or return the whole list, not just the first thing.
Working example:
> x <- 1
>
2013 Jan 17
3
how to use "..."
Dear users,
I'm trying to learn how to use the "...".
I have written a function (simplified here) that uses doBy::summaryBy():
# 'dat' is a data.frame from which the aggregation is computed
# 'vec_cat' is a integer vector defining which columns of the data.frame
should be use on the right side of the formula
# 'stat_fun' is the function that will be run to
2018 Aug 05
2
Is this a bug in `[`?
Thanks.
This is exactly the doubt I had.
Rui Barradas
?s 05:26 de 05/08/2018, Kenny Bell escreveu:
> This should more clearly illustrate the issue:
>
> c(1, 2, 3, 4)[-seq_len(4)]
> #> numeric(0)
> c(1, 2, 3, 4)[-seq_len(3)]
> #> [1] 4
> c(1, 2, 3, 4)[-seq_len(2)]
> #> [1] 3 4
> c(1, 2, 3, 4)[-seq_len(1)]
> #> [1] 2 3 4
> c(1, 2, 3, 4)[-seq_len(0)]
2023 Jul 31
1
random network disconnects
I'm experiencing a weird issue, and wondering if anyone has seen this,
and better yet has a solution.
At work we are getting lots of issues with 'permission denied' or
'network not found' and so forth when reading and writing between our
machines and a file server. This happens randomly so the following
function solves the problem for 'cat' commands:
catSafer