[R] make elements of a list into functions

2015-03-24 Thread Kruti Pandya
Hi I have a list called g as follows and I want to make elements of g into functions so that I can evaluate them at randomly generated data point say c(0,0,0). For example, change g[[1]] (!x[2] & !x[3]) | (!x[2] & x[3]) | (x[2] & x[3]) to function(x) (!x[2] & !x[3]) | (!x[2] & x[3]) | (x[2] & x

[R] wrapper function in R

2015-03-15 Thread Kruti Pandya
I want to extract each of the logical expressions of generateRandomNKNetwork function and evaluate each expression as follows: h[[1]]<-function (x) {(!x[3] & x[1]) | (x[3] & !x[1])} h[[1]](c(data[,1])) [1] TRUE h[[1]](c(data[,2])) [1] TRUE I applied a wrapper function to pass the

[R] reading multiple text files from web

2015-03-11 Thread Kruti Pandya
I am trying to extract information “OS Vendor” and “OS Name” from the following text file online. http://spec.org/jEnterprise2010/results/res2013q3/jEnterprise2010-20130904-00045.txt My goal is to extract these two attributes from all the text files available from this link given below and put

[R] extract objects from R output

2014-12-14 Thread Kruti Pandya
I am new to R and using this package BoolNet. I wanted to extract the boolean transition functions resulting from the output of generateRandomNKNetwork function. I am able to extract individual function using net$interactions$Gene1$expression,net$interactions$Gene2$expression . But it gives me