Displaying 20 results from an estimated 10000 matches similar to: "Does R have an equivalent for Matlab's cell array?"
2013 Jan 04
3
How to plot multiple time series with different time base in same plot?
Hi
I have to time series with a different time base.
The first has only sporadic datapoints:
2011-02-01 15.29130
2011-02-08 17.60278
2011-02-15 17.99737
2011-02-22 25.43690
The other has a daily datapoint:
2011-02-01 342.34
2011-02-02 68.45
2011-02-03 130.47
2011-02-04 129.86
2011-02-05 81.98
2011-02-06 77.30
2011-02-07 81.38
2011-02-08 139.95
2011-02-09 124.40
...etc.
In Excel, it is fairly
2007 May 07
1
looking for equivalent of matlab's medfilt1 function
Dear all,
I have several files with Matlab code, which I am translating to R.
For the zero-level approach, I took the very old shell script from R-help
archives, which has made some obvious leg-work such as replacement of "="
with "<-".
Now I am translating indexing, matrix operations and function call using
this table
http://37mm.no/mpy/octave-r.html
The problem is, I
2013 Mar 05
1
ggplot2: two time series with different dates in a single plot
Hi
Using the ggplot2 package, I would like to obtain a plot that contains two
time series that have data points on different dates.
For instance, one data frame looks like:
date1, value1
2010-01-05, 2921.74
2010-01-08, 2703.89
2010-01-14, 3594.21
2010-01-20, 3659.22
The other data frame looks like
date2, value2
2010-01-01, 285.85
2010-01-02, 229.20
2010-01-05, 333.91
2010-01-06, 338.27
2009 Mar 10
2
R equivalent to MATLAB's "whos" Command?
By any chance is there an R equivalent to MATLAB's "whos" command?
I tried searching R and R-seek, but didn't really come up with anything.
There are several items I would like to make sure are stored in the workspace and check their values.
Thank you again for your help and any feedback.
> ?workspace
No documentation for 'workspace' in specified
2007 Jul 16
1
R equivalent to Matlab's Bayes net toolbox
Hi,
I'm attending summer School at UCLA (IPAM) on "probabilistics models of
cognition". I have been an R-user since v. 1.4.1, but was trained in the
frequentist tradition (as most psychologists!). I found that all faculty
here use matlab and Murphy's bayes net toolbox. I have not had the need to
use matlab before, and would love to stick to R for graphics models and
2009 Jun 30
2
Equivalent to Matlab's "Ans"
Hi everyone,
I was just wondering if there is an equivalent in R to the shortcut "Ans" in
MatLab whereby I can use the previous result for the current command? This
could save a lot of time when hacking in R itself, not from an editor.
Thanks,
Stephane
[[alternative HTML version deleted]]
2006 Feb 15
2
arrays of lists in R ("cell arrays" in Matlab)
Dear all
I would like to have some data in the form of a 2-dimensional array
(matrix) of lists, so that I can easily find the desired list object by
indexing the structure by rows and columns. In matlab there exists a
data type called "cell array": a matrix of "cells", which are composite
objects very similar to R lists.
I know that in R you can create 1-dimensional
2004 Oct 07
8
Equivalents of Matlab's 'find' and 'end'
Sorry if these questions have been asked recently--I'm new to this list.
I'm primarily a Matlab user who is attempting to learn R and I'm searching for possible equivalents of commands that I found very handy in Matlab. So that I don't seem ungrateful to those who may answer, I HAVE determined ways to carry out these processes in 'brute force' sorts of ways in R code,
2009 Feb 20
2
equivalent function to MatLab 'step' ?
I have to admit I don't fully understand how MatLab's step() function
works, but I'm learning that part. Can someone point me to
equivalent&related functions in R?
thanks
Carl
2000 Jun 08
7
R Equivalent to matlab's find() command?
hi,
Just a very simple question: is there an R equivalent to the matlab
command find(X) which returns the indices of vector X that store
non-zero elements?
e.g.
> find( [1 0 0 1 0])
ans =
1 4
so, in R, how do I do:
ans <- rfind( c(1,0,0,1,0))
so that ans is the vector c(1,4)
thanks, stephen
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help
2009 Dec 24
3
Newbie: colSums() compared with Matlab's sum()
Hi all,
I'm trying to learn R after years of Matlab's experience. Here is an
issue I couldn't solve today.
Consider the following piece of code (written by memory):
for(i in 1:n){
submat <- data[1:i,]
C <- colSums(submat)
}
The problem is that at the first iteration, data[1:1,] reduces to a
vector and colSums returns an error. This sounds really strange to me
2007 Sep 07
2
Matlab's lsqnonlin
Hi! I'm translating some code from Matlab to R and I found a problem.
I need to translate Matlab's function 'lsqnonlin'
(http://www-ccs.ucsd.edu/matlab/toolbox/optim/lsqnonlin.html) into R,
and at the beginning I thought it would be the same as R's 'optim'. But
then I looked at the definition of 'lsqnonlin' and I don't quite see how
to make
2006 Jun 12
1
r's optim vs. matlab's fminsearch
Hi,
I'm having a problem converting a Matlab program into R. The R code works
almost all the time, but about 4% of the time R's optim function gets stuck
on a local minimum whereas matlab's fminsearch function does not (or at
least fminsearch finds a better minimum than optim). My understanding is
that both functions default to Nelder-Mead optimization, but what's
different about
2005 Jun 24
3
Counterpart for Matlab's 'feval'?
Hi!
I've just begun writing a program that searches for the minimum of a
function with golden section search. In order to do this in a nice way I
need a function that takes a function name and an argument and returns the
function value for that argument, i .e just like Matlab's 'feval'. Is
there any?
Thanks before hand!
Best regards,
Fredrik Thuring, Codan Insurance A/S
2009 Jan 30
1
Equivalent of Hold On MatLab Command
Does R have a graphic command equivalent of MatLab Hold On ?
I am trying to sabve on a pdf file a composite drawing. I first declare the canvas size, then I define the layout, finally I generate the 4 plots according to layout order. Eventually I close the pdf file (dev.off()).
The resulting PDF file contains 2 pages. The first one shows only the layout. The second one shows the whole
composite
2012 Apr 28
2
Equivalent of Nothing (in VBA) or [] in Matlab in R
Hi, I am very new to R so please excuse me if I am asking very obvious
questions.
I am trying to call a blackbox api function implemented in as a COM object
from R. The function definition says that
1. if calling from VBA, the first parameter should be set to "Nothing"
2. if calling from matlab, the first parameter should be set to []
What should be the equivalent for above in R?.
2006 Sep 27
3
multidimensional lists
In the process of moving a number of my scripts from MATLAB -> R, I've
discovered that there is no 'pure' equivalent of MATLAB's cell arrays,
which I use quite often. Basically, I create matrices (as a cell array)
where each element of the matrix is itself a matrix (e.g., 2x2 cell
array where each element of the array is another matrix). I pass these
cell arrays to various
2010 May 08
1
matrix cross product in R different from cross product in Matlab
Hi all,
I have been searching all sorts of documentation, reference cards, cheat
sheets but can't find why R's
crossprod(A, B) which is identical to A%*%B
does not produce the same as Matlabs
cross(A, B)
Supposedly both calculate the cross product, and say so, or where do I
go wrong?
R is only doing sums in the crossprod however, as indicated by
(z <- crossprod(1:4)) # = sum(1 +
2007 Jun 26
4
Looking for parallel functionality between Matlab and R
I'm slowly moving my statistical analysis from Matlab to R, and find myself
missing two features:
a) How do I mimic Matlab's 'hold on'? (I want to show several plots
together, when I type two plots one after the other the second overwrites
the first)
b) How do I mimic Matlab's 'axis'? (after drawing my plots I want to zoom on
specific parts- for example, x=0:5,
2009 Jan 30
3
Matlab inv() and R solve() differences
I submit the following matrix to both MATLAB and R
x= 0.133 0.254 -0.214 0.116
0.254 0.623 -0.674 0.139
-0.214 -0.674 0.910 0.011
0.116 0.139 0.011 0.180
MATLAB's inv(x) provides the following
137.21 -50.68 -4.70 -46.42
-120.71 27.28 -8.94 62.19
-58.15 6.93 -7.89 36.94
8.35 11.17 10.42 -14.82
R's solve(x) provides:
261.94 116.22 150.92 -267.78
116.22 344.30 286.68