similar to: Fortune?

Displaying 20 results from an estimated 3000 matches similar to: "Fortune?"

2014 Jan 03
1
wishlist: decreasing argument to is.unsorted
I've just realized that it could be handy to have a 'decreasing' argument in 'is.unsorted'. And I'm cheekily hoping someone else will implement it. It is easy enough to work around (with 'rev'), but would be less hassle with an argument. The case I have in mind uses 'is.unsorted' in 'stopifnot'. Pat -- Patrick Burns pburns at pburns.seanet.com
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')
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
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
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 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
2010 Feb 12
1
Using seq_len() vs 1:n]
Pat Burns makes a good point. -Peter -------- Original Message -------- Subject: Re: [R] Using seq_len() vs 1:n Date: Fri, 12 Feb 2010 09:01:20 +0000 From: Patrick Burns <pburns at pburns.seanet.com> To: Peter Ehlers <ehlers at ucalgary.ca> References: <4B746AEF.10900 at ucalgary.ca> If you want your code to be compatible with S+, then 'seq_len' isn't going to work.
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
2010 Jul 04
1
arr.ind argument to which.min and which.max
Is there a reason that 'which.min' and 'which.max' don't have an 'arr.ind' argument? The context in which I wanted that was a grid search optimization, which seems like it would be reasonably common to me. -- Patrick Burns pburns at pburns.seanet.com http://www.burns-stat.com (home of 'Some hints for the R beginner' and 'The R Inferno')
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 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 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
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 >
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
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