similar to: Determining whether a function's return value is assigned

Displaying 20 results from an estimated 1000 matches similar to: "Determining whether a function's return value is assigned"

2009 Nov 26
1
Does nargin and nargout work with R functions?
I am porting some MATLAB functions over to R and hopefully into a package, so I am curious if nargin and nargout work with R functions. Here is kind of an example of where I need to head in order to port "control-1.0.11" from Octave over to R. The Octave "control-1.0.11" package has the capability to produce bode plots of transfer functions. I hope to post this package once
2006 Sep 14
4
WAIT FOR DIGIT not working
Hello all, I have been trying to solve this problem for days, with no luck. When I run an AGI script from my extensions.conf, it seems no matter what I do, the "WAIT FOR DIGIT" command will not work. The system just flies past it without waiting a single millisecond, and of course my script crashes because it doesn't have the input it needs. I have run 3 different versions of
2011 May 31
0
[LLVMdev] multiple function return values in LLVM
Hi Yabin, Octave uses an octave_value_list object to return multiple values so I don't think it has anything to do with the compiler. A sample function that can be dynamically linked with Octave and called from octave interpreter: #include <octave/oct.h> DEFUN_DLD (divmult, args, nargout, "") { octave_value_list retval; // do some computation to compute r0 and r1
2006 Jun 14
1
matrix log
Dear R users, Has anyone implemented a "matrix log" function in R similar to the function logm() in Matlab? I did a quick R site search and browsed the contributed packages to no avail. The octave function is far too simplistic and fails for the Matlab test matrix. Ideally, the code of Cheng, Higham, and Laub (2001) or something similar could be utilized. Just checking before I
2011 May 31
2
[LLVMdev] multiple function return values in LLVM
Hi all, How can I implement a multiple function return values scheme in a performance efficient way, just like what be done in Matlab or Octave? Thanks in advance, Yabin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110531/5813e7a6/attachment.html>
2006 Sep 04
1
Bad substitution for %a variable
Hi, The %a variable is not well substituted for XP64. For separation of profiles of different OS we use the %a variable: logon path = \\%L\Profiles\%U\%a With samba3021b the variable points to Win2K for XP64! This result in trouble with the user profiles! Walter
2003 Jul 01
0
Problems with eepro100 or BroadCom NetXtreme and s yslinux 2.04
This sounds kind of like what happened with me for earlier attempts at using syslinux. Skip using HPA's tools entirely and dd if=vmlinuz of=/dev/fd0 bs=1440k count=1 and make sure that the kernel runs from a floppy disk. There'll be no file system or anything, but you'll make sure that your kernel isn't faulty. If it doesn't execute, then you can avoid the syslinux/pxelinux
2004 May 04
0
Character, Codepage Problems?
Hello, we have some strange things with samba 3.0.2a, AIX5.1, ML03: 1. ./configure --prefix=/usr/samba : : checking for iconv in /usr... yes checking can we convert from CP850 to UCS2-LE?... no checking can we convert from IBM850 to UCS2-LE?... no checking can we convert from ASCII to UCS2-LE?... no checking can we convert from 646 to UCS2-LE?... no checking can we convert from UTF-8 to
2009 Oct 26
2
R CMD check: Error in .C
Function/file names are hypothetical. Say I have written myfunction.R, which calls myfunction.c via .C("myfunction", ...). I've compiled successfully myfunction.c via R CMD SHLIB myfunction.c in the terminal. Then, in the R console: dyn.load("myfunction.so") source("myfunction.R") test <- myfunction() # works fine So everything is in order, myfunction works
2003 Jun 26
4
Problems with eepro100 or BroadCom NetXtreme and syslinux 2.04
Hi all! We use pxelinux for booting a diskless Linux from whitch we install all our systems. But we discovered some Problems: - With v1.75 the Kernel is fetched from the TFTP-Server with no problem, but it gets not started on Broadcom NetXtreme with newer PXE-Bioses - With v2.04, pxelinux even seems not to be able to fetch the kernel from the TFTP-Server. This affects also Intel's
2007 Apr 03
3
Referencing function name from within function
Hello, For verbose coding I'd like to do something like: > myfunction <- function(x){ > if (a){ > stop(paste(myfunction_name_here,"requires xyz!") > } Is that possible? Thanks for any hints, Joh
2012 Mar 13
2
beginner's loop issue
Dear All, I hope you don't mind helping me with this small issue. I haven't been using R in years and I'm trying to fill in a matrix with the output of a function (I'm probably using the Matlab logic here and it's not working). Here is my code: for (i in 1:length(input)){ out[i,1:3] <- MyFunction(input[i,1],input[i,2], input[i,3]) out[i,4:6] <-
2006 Jun 28
2
hopefully my last question on lapply
Marc and many other people ( whose names escape me ) have been very helpful in explaining the use of lapply to me. In his last response, Marc explained that if tradevectors is a list of vectors of different lengths ( excuse my terminology ) then lapply(tradevectors,function(x) G[x]*B[x] ) will go through each component of the list as if it was a vector and apply the element by element
2008 Nov 14
1
no dial to busy sip line
Hi list, is it possible to get in the running dialplan the status of (SIP) lines without using AGI or anything like that? What I want is a stepwise calling: I have several SIP lines (let's say they are three) which I want to dial to alternatingly. But I do not want to dial to a already busy line and catch the busy. Instead I do not want to dial to that peer but to the next one. I want to have
2006 May 16
3
multiple plots in a function()
Dear all, I have the following problem: I have written a function genereating to plots, eg myfunction <- (data, some.parameters) { #some calculations etc . par (mfrow=c(1,2)) plot1(......) plot2(.....) } which works fine. But for analysing several variants, I tried a slope, eg: par (mfrow=c(5,5)) for ( i in 1:10) { myfunction(data, i) } Off
2009 Jun 03
1
Using constrOptim() function
I have a function myFunction(beta,x) where beta is a vector of coefficients and x is a data frame (think of it as a matrix). I want to optimize the function myFunction() by ONLY changing beta, i.e. x stays constant, with 4 constraints. I have the following code (with a separate source file for the function): rm(list=ls()) source('mySourceFile')
2012 Nov 23
1
Adding a function with default parameters into the Rcmdr menu
Hi everyone, I made some tests with Rcmdr, to add a function with default parameters : For example (very simple): myfunction<-function(var="314"){ print("hello") print(var) } if I run myfunction() directly i see : > myfunction() [1] "hello" [1] "314" it's ok. But if i edit de Rcmdr-menu.txt (in
2005 Oct 08
4
Warning: condition has length > 1
Hi - I was wondering if anyone came across a problem such as mine! I was trying to create a user-defined function, however, the results from calling the function are unexpected! When passing X parameter as a single value variable (x<-c(3)), everything works fine. However, when passing a parameter as a vector with multiple values (as the case in my code), the 'if condition' is only
2018 Aug 09
3
WishList: Remove Generic Arguments
I apologize if this issue has been raised before. I really like object oriented S3 programming. However, there's one feature of object oriented S3 programming that I don't like. Generic functions can have arguments other than dots. Lets say you have an R package with something like: print.myfunction (f, ...) { dosomething (f, ...) } Noting that I use function objects a lot. R CMD
2008 Dec 17
4
passing arguments to subset from a function
Hello R-helpers, I'm writing a long function in which I manipulate a certain number of datasets. I want the arguments of said function to allow me to adapt the way I do this. Among other things, I want my function to have an argument which I will pass on to subset() somewhere inside my function. Here is a quick and simplified example with the iris dataset. myfunction<-function(table,