Displaying 20 results from an estimated 9000 matches similar to: "how to multiply a constant to a matrix?"
2006 Feb 04
3
R command line: need intelligent command history recall?
Hi all,
I am not sure if this feature exists in the R-console command line prompt:
In Matlab, if I want to enter a command which is similar to what I have
entered before,
I can enter a few prefix, then press "->", the previous command that matches
with this prefix will then appear on this command line, and it saves a lot
of our time.
For example:
> abline(lm(new~old))
>
2012 Jul 17
3
complexity of operations in R
Hello!
I am optimizing my code in R and for this I need to know a bit more about
the internals. It would help tremendously if someone could link me to a
page with O()-complexities of all the operations.
In this particular case, I need something like a linked list with O(1)
insertLast/First ability. I can't preallocate a vector since I do not know
the final size of the list ahead of time.
The
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')
2010 May 30
4
Data Frame as Hash Table
I'm interested in using a data frame as if it were a hash table.  For
instance if I had the following,
> (d <- data.frame(key=seq(0.5, 3, 0.5), value=rnorm(6)))
  key        value
1 0.5 -1.118665122
2 1.0  0.465122921
3 1.5 -0.529239211
4 2.0 -0.147324638
5 2.5 -1.531503795
6 3.0 -0.002720434
Then I'd like to be able to quickly retrieve the "value" of "key" 1.5
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')
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
2010 Feb 25
24
two questions for R beginners
* What were your biggest misconceptions or
stumbling blocks to getting up and running
with R?
* What documents helped you the most in this
initial phase?
I especially want to hear from people who are
lazy and impatient.
Feel free to write to me off-list.  Definitely
write off-list if you are just confirming what
has been said on-list.
-- 
Patrick Burns
pburns at pburns.seanet.com
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.
2008 Oct 24
1
Repetitive correlation test
Dear all,
Through the following code, I wanted to perform correlation test repetedly (through loop) on different combinations of variables of a data set.
Code:
x=read.table("sample.txt",header=T,sep="\t")
out="corout.txt"
sink(out)
nm = names(x)
print(nm)
nvr=3
# nvr=Total no. of variables in the input data file
for (i in 1:(nvr-1))
{
for(j in (i+1):nvr) 
{
frm=
2009 Jun 14
6
a proposal regarding documentation
Proposal
That a new mailing list be established
that pertains exclusively to R documentation.
The purpose of the list would be to discuss
weak sections of the documentation and
establish fixes for those weak spots.
Pro
If it works, there would be better documentation.
It would be an excellent opportunity for newish
and/or less technical people to contribute to R.
In some respects such people
2004 Jun 14
4
interrupt in Linux
Does anyone know how to interrupt R in RedHat? Neither control-c nor Esc is working. What I don't want to do is close the window or kill the entire R process.
Thanks,
David
This communication is for use by the intended recipient and ...{{dropped}}
2004 Jul 12
1
RE: tail(<matrix>) column numbers
I also vote for the 'helpful' addition on row numbers based on the original
matrix when no row names are present, with an optional argument to prevent
this behaviour.
-G
> -----Original Message-----
> From: Duncan Murdoch [mailto:dmurdoch@pair.com]
> Sent: Monday, July 12, 2004 8:06 AM
> To: Patrick Burns
> Cc: Martin Maechler; Warnes, Gregory R; Prof Brian Ripley; 
>
2010 Jun 20
6
Popularity of R, SAS, SPSS, Stata...
Hi All,
I've been fiddling around with various ways to estimate the popularity
of R, SAS, SPSS, Stata, JMP, Minitab, Statistica, Systat, BMDP, S-PLUS,
R-PLUS and Revolution R. It's not an easy task. You can see what I've
come up with so far at http://r4stats.com/popularity . I'm sure people
will have plenty of ideas on how to improve this, so please let me know
what you think.
2012 Sep 20
3
Applying glm coefficients (Beginner Question)
Hello,
I am working with a dataset with three variables and one binomial parameter.
The glm function provides coefficients for these three variables, e.g.
-1.5 | 27.2 | -2.9
If I'm not mistaken, $fitted.values gives me an estimate of how likely my
parameter is to be true/1 . I would like to apply these coefficients on
other variables to predict the binomial parameter but I'm not sure how
2012 Dec 17
4
R beginner: matrix algebra
Hi, I have an n x m matrix of numerical observations. ie. stock prices
I wish to convert the matrix of observations to a matrix of simple returns
(by taking the differences between (column) observations.)
Can any good soul suggest a function for this? 
--
View this message in context: http://r.789695.n4.nabble.com/R-beginner-matrix-algebra-tp4653335.html
Sent from the R help mailing list
2007 Jul 31
1
Error message when running lm() with na.action=NULL
Hi there,
I am trying to run a liner regression using lm with na.action = NULL, but I
am getting an error message. Any ideas as to why this may be happening?
Please see code and error message below:
> reg_test<-lm(yy~.,data=test,na.action=NULL)
Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : 
        NA/NaN/Inf in foreign function call (arg 4)
This message and
2009 Jun 04
4
order() with randomised order in ties?
Hi
I want to use order() to get the order of a vector.
But I would need a different behavior when ties occur: similar to the
parameter  ties.method = "random" in the rank() function, I would need
to randomise the ties. Is this possible?
Example:
x <- rep(1:10, 2)
order(x)
 [1]  1 11  2 12  3 13  4 14  5 15  6 16  7 17  8 18  9 19 10 20
order(x)
 [1]  1 11  2 12  3 13  4 14  5 15 
2007 Feb 28
2
sort of OT: bootstrap tutorial
There is now a tutorial on bootstrapping and other resampling
methods at:
http://www.burns-stat.com/pages/Tutor/bootstrap_resampling.html
Corrections and other suggestions are welcome.
The project started because a novice asked me about bootstrapping.
My response was, "How dare you bug me while I'm playing with my
cats, just google for it."  My correspondent was not very impressed
2008 Oct 23
15
VEC Operator in R
Can anyone please tell whether there is any R function to act as "VEC" and
"VECH" operator on Matrix? Yes of course, I can write a
user-defined-function for that or else, I can put dim(mat) <- NULL. However
I am looking for some R function.
Your help will be highly appreciated.
Regards,
-- 
View this message in context: