similar to: Equivalent to Matlab's "Ans"

Displaying 20 results from an estimated 4000 matches similar to: "Equivalent to Matlab's "Ans""

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
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
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
2012 Dec 22
4
Does R have an equivalent for Matlab's cell array?
Hi I have a time series of measurements: every 10 min. a value was logged. The data look like: 20100914 08:01 3.74 20100914 08:11 3.74 20100914 08:21 3.71 20100914 08:31 4.39 20100914 08:41 3.74 This data spans several months. I would like to group the data per day. In Matlab it is fairly easy to obtain a cell array, of which the first column contains the date of each
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
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 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
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
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
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
2004 Feb 11
1
.Call setAttrib(ans,R_DimSymbol,dim); Crashes.
Hi! I want to return a matrix. The code does the R interfacing. This version does it fine. SEXP ans,dim; PROTECT(ans = NEW_NUMERIC(count*2)); memcpy(NUMERIC_POINTER(ans),result,count*sizeof(double)); memcpy(&(NUMERIC_POINTER(ans)[count]),occur,count*sizeof(double)); /** PROTECT(dim=NEW_INTEGER(2)); INTEGER_POINTER(dim)[0]=2; INTEGER_POINTER(dim)[1]=count;
2011 Jul 17
3
How to convert number (matlab) to date
Hello I am new to R and I need to convert some dates (numeric format by matlab) to actual dates in R. For instance, Matlab -> 730456 -> >> datestr(730456) ans = 02-Dec-1999 R - > library(zoo) > as.Date(730456) [1] "3969-12-03" I don't not mind the output format but it needs to be right. Many thanks Ed
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
2017 Nov 04
1
ans[nas] <- NA in 'ifelse' (was: ifelse() woes ... can we agree on a ifelse2() ?)
Removal of ans[nas] <- NA from the code of function 'ifelse' in R is not committed (yet). Why? -------------------------------------------- On Mon, 28/11/16, Martin Maechler <maechler at stat.math.ethz.ch> wrote: Subject: Re: [Rd] ifelse() woes ... can we agree on a ifelse2() ? Cc: R-devel at r-project.org, maechler at stat.math.ethz.ch Date: Monday, 28 November, 2016, 10:00
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?.
2008 Dec 05
1
lme4, error in mer_finalize(ans)
Using lmer() on my data results in an error. The problem, I think, is my model specification. However, lm() works ok. I recreated this error with a more simple dataset. (See code below.) # word and letter recognition data # two within factors: # word length: 4, 5, 6 letters # letter position: 1-4 (in 4-letter words), 1-5 (in 5-letter words), 1-6 (in 6-letter words) # one dependent variable: #
2007 Aug 16
0
Asterisk & SNOM Page/Auto Ans - SNOM only beeps intermittently
I have been trying to track this down for a while to no avail. I have a variety of different SNOM phones (the entire 3XX series) and have also tried on a variety of different Asterisk versions (pretty much the whole 1.2 and 1.4 train) When I "Page()" phones in Asterisk, I only intermittently get an audio indication on the recipient phone. Audio Indicator is turned on, and I'm
2003 May 12
0
[Ans.]openssh3.6p2 version ... Password aging problem???
Our server is only opened 22 sshd port... We wants our server secuirty is more higher, so decide to password aging policy... Linux command is "chage" is very useful, but openssh3.3 higher version is not effected... [root at radius ~]# chage -l test Minimum: 0 Maximum: 2 Warning: 2 Inactive: 2 Last Change: May 09, 2003 Password Expires: May
2000 Jun 19
0
Problem with yppasswd ans openssh on Irix
Hi, I compiled openssh 2.1.1p1 on Irix 6.2 with MIPS 7.2.1.2m compiler. All works fine except the yppasswd command from Irix (it's no NIS-problem, same with rlogin works): Logged in with 'ssh machine -l user1' # who user1 ttyq0 Jun 19 15:17 (xxxxx.iwr.uni-heidelberg.de) # ypcat passwd |grep user1 user1:xxxxxxxxxxxxx:1535:1500:User1:/usr/people/user1:/bin/tcsh # ypcat passwd |grep