similar to: passing arguments to a function problem

Displaying 20 results from an estimated 200 matches similar to: "passing arguments to a function problem"

2011 Nov 26
2
simplify source code
Hi I would like to shorten mod1 <- nls(ColName2 ~ ColName1, data = table, ...) mod2 <- nls(ColName3 ~ ColName1, data = table, ...) mod3 <- nls(ColName4 ~ ColName1, data = table, ...) ... is there something like cols = c(ColName2,ColName3,ColName4,...) for i in ... mod[i-1] <- nls(ColName[i] ~ ColName1, data = table, ...) I am looking forward to help Christof
2002 Nov 04
3
write table and dinnames
I would write in tab-text file a table like this one: TAB colname1 TAB colname2 TAB TAB... colnameN rowname1 # # # rowname2 # # # rownameM # # # then I wrote something like: mymatrix <- matrix(nrow=M,ncol=N,byrow=T) rownames(mymatrix) <- chvector1 colnames(mymatrix) <- chvector2
2007 Jun 06
2
lookup in CSV recipe
I await Luke''s node settings implementation with interest. At the moment however, I have this sort of ugliness: $site = $hostname ? { fred => "opsera", barney => "bedrock", default => "unknown site", ... } So I''ve knocked up this little function to use CSV files instead. Now I can just do: $site =
2008 Mar 23
1
Exporting of R dendrogram object in the format of Eisen´s Cluster
Dear R-users, I would like to use Cluster 3.0 for my data because of its zooming, link out and copy (gene)labels into clipboard options. Unfortunately the program doesnt allow use of the distance metrics I would like to use. I would like to ask if there is some library, that allows saving dendrogram object in the format readable by Cluster. Thank you for reply. --
2007 Nov 25
1
Constructin a call of function including permutation of column names - how to escape parentheses?
Dear R-users, I would like to construct a list of arguments for a function in a format function (list(item1=c("A","B"), item2=c("B","C")), item3=...): The individual vectors in the list are permutations of colnames of a dataframe. The trouble is that I am not able to handle escaping of parentheses correctly. I was trying the following: library(gregmisc)
2008 Jan 13
1
Trying to write Merge for more data.frames - Error in match.names(clabs, names(xi))
Dear list members, I would like to merge multiple dataframes and seems that this task is going to be required quite often, so I decided to write a simple (pseudo)recursive merge. I started with the case when dataframes are merged by rows (0). But there is a problem when a dataframe to be merged in the step n has some items that are not in previous ones. Then I get "Error in match.names(clabs,
2009 Dec 31
3
How x[, 'colname1'] is implemented?
I don't see where describes the implementation of '[]'. For example, if x is a matrix or a data.frame, how the lookup of 'colname1' is x[, 'colname1'] executed. Does R perform a lookup in the a hash of the colnames? Is the reference O(1) or O(n), where n is the second dim of x?
2009 Dec 31
3
How x[, 'colname1'] is implemented?
I don't see where describes the implementation of '[]'. For example, if x is a matrix or a data.frame, how the lookup of 'colname1' is x[, 'colname1'] executed. Does R perform a lookup in the a hash of the colnames? Is the reference O(1) or O(n), where n is the second dim of x?
2008 Apr 26
1
sys.time question - how to improve R performance
Dear R-users, I run my program a difference between sys.times is as follows: user system elapsed 60167.53 2848.75 63278.93 I am quite puzzled how it may happen that system time is so much shorter than user time, I have 2 core computer most of the time (90%) I was not doing anything else with the computer. What could be the reason of such a difference? I switched off file indexing and all
2006 May 17
0
variable colnames
Hy all, I apologize i've used rownames instead of colnames in my first exemple. (that's why i changed the mail object) I was on mars when i wrote my question... Every answer where correct ... but, because i've made a wrong question, people wern't able to understand... So finally i'm speaking about colnames : Let's be more precise: I've got a query that gives me for
2014 May 28
1
Ellipsis to Two Functions When One Has Nested Functions
Hello If I have a function aFunction <- function(data, alpha, ...) { transform(alpha, ...) rowMeans(data) > alpha } f <- function(data, selection, ...) { selected <- selection(data, ...) plot(data[selected, ], ...) } f(aDataset, aFunction, alpha = 10, pch = 19, transform = sqrt) and selection calls another function, which has ... and that function calls other
2004 Mar 24
7
binding vectors or matrix using their names
Hello list, I have two vectors x and x2: x=runif(10) x2=runif(10) and one vectors with their names : my.names=c("x","x2") I would like to cbind these two vectors using their names contained in the vector my.names. I can create a string with comma ncomma=paste(my.names,collapse=",") and now, I just need a function to transform this string into a adequate
2016 Sep 19
3
llvm interpreter does not find function defined by addGlobalMapping
Hi, I want to use a function defined in c(++)-code from code generated by llvm. For this I use ExecutionEngine.addGlobalMapping(). I started with the JIT execution engine and everything worked, then I switched to the interpreter engine and it stopped working, but only if compiled on a Linux system. More precisely it works if I use llvm 3.8.1 + gcc (Linux) + JIT llvm 3.8.0 + mingw-gcc
2010 Feb 15
2
Problem with Win 7 and Samba 3.3.10 PDC (Trust Relationship Between Workstation and Domain Failed)
Dear all, We are trying to install a new Samba server to replace the old one and support Windows 7 clients. But it doesn't work ! When we try to register a machine into th domain, it seems to be accepted by the client but we find these messages in samba logs : > rpc_server/srv_netlog_nt.c:_netr_ServerAuthenticate2(555) > _netr_ServerAuthenticate2: netlogon_creds_server_check
2001 Dec 29
2
how to convert ext3 to ext2
Hi, I am using RH 7.2 Enigma and with ext3 filesystem. Before installing RH Linux, I used Partition Magic 7 in Windows to prepare partition ext2 for Linux which was then converted to ext3 when installing RH 7.2. Now that I want to expand the space for the Linux partition, I find out that PM 7 does not support and recognize ext3 filesystem. My questions then are: 1. How do I convert ext3 to
2008 May 29
7
How do you exit a function in R?
For example, based on a certain condition, I may want to exit my code early: # Are there the same number of assets in "prices" and "positions"? if (nAssetPositions != nAssetPrices) { cat("Different number of assets! \n\n") <exit function> } I have searched, but not
2012 Oct 03
0
[LLVMdev] [cfe-dev] Does LLVM optimize recursive call?
Hello David Chisnall, John McCall, David Blaikie and other people who may concern > If your teachers are really making this sort of superficial generalization, > they're doing you a disservice. This hit my head. Actually I didn't test the performance of those two, the iteration and the recursion, at all. And in this field of study, testing is very much important, I believe. And
2012 Oct 03
2
[LLVMdev] [cfe-dev] Does LLVM optimize recursive call?
On 3 Oct 2012, at 09:48, John McCall wrote: > If your teachers are really making this sort of superficial generalization, > they're doing you a disservice. I completely agree with John here - we had a case a few years ago where someone spent ages refactoring their algorithm to be iterative and was surprised that it became slower (with the MS compiler). Looking at the assembly, it was
2011 Jun 24
6
Code? or Test Pattern?
My name is Kenji Ichinoseki and I am in charge of a project at Sumitomo Electric Networks, Inc. Please give me cooperation by all means about the affair in the account of a title. Now, I included "Samba 3.0.37" in the Linux system currently developed (us). And it is testing using "smbtorture(samba3.5.8 source4) ". The point in question was found in our entry of this test. It
2007 May 18
1
penalized maximum likelihood estimator
dear R-helper, I tried to find out a package in which i can have penalized maximum likelihood estimator applying on generalized extreme value distribution with beta function) but could not. would you please help me to know the name of the package. thanks for your help. S.Murshed --- r-help-request at stat.math.ethz.ch wrote: > Send R-help mailing list submissions to > r-help at