Displaying 20 results from an estimated 700 matches similar to: "Function to save plots"
2008 Mar 02
2
[LLVMdev] Struct layout assumptions
A question about the layout of structs: I decided to make my vtables out
of structs rather than arrays. In other words, instead of being a table
of opaque pointers, I decided to individually declare each entry with
the correct type for that method. I figure that the various optimizers
could do a better job if I preserve the type info.
OK, so we come to the issue of inheritance: Suppose I have
2011 Jul 26
2
Accessing the index of factor in by() function
Hello,
Here are three vectors to give context to my question below:
*id <- c(1,1,1,1,1,2,2,2,3,3,3))
month <- c(1, 1, 2, 3, 6, 2, 3, 6, 1, 3, 5)
value <- c(10, 12, 11, 14, 16, 12, 10, 8, 14, 11, 15)*
and I want to plot "value" over "month" separately for each "id". Before I
can do that, I need to section both month and value, based on ID. I create a
2010 Jan 04
3
how to draw abline correctly?
Hello, I am frastruated with this graph, just cannot get what I need. Thank
you for any suggestions or help. I really appreciate it. I wrote the
following code, but there are 3 problems
1, the red line is added on the graph but without any marker on the y-axis.
I want to display the number '.1361' on the y-axis. So people can easily
tell 'method 2' gets a constant estimate, which
2010 Aug 20
2
U value from wilcox.test
Dear all,
I want to compare the efficiency of 2 methods in extracting proteins from
algal samples. I collected 6 independant algal samples and I extracted 3 by
the method 1 and 3 others by the method 2.
So I have 2 groups of 3 samples, that are not paired. I would like to know
if the results obtained by these 2 methods are significantly different, I
hope method 2 to be more efficient than method
2005 Sep 25
1
Prototype "classes" and inheritance
JavaScript doesn''t (yet) have a notion of classes. Prototype.js just
adds a suitable convention for implementing them. It provides a way to
create a new class by extending a base class using Object.extend, but
it doesn''t handle method inheritance. There are ways of doing
implementing this through traversing the chain of prototypes, but I''m
not sure they are
2006 Jul 06
3
Calling Method
Is there a way to call a method if I only have a string that contains
the method name.
For example:
@methods = [''method1'', ''method2'', ''method3'']
@step = 1
# I want to call method2 which has a definition in this class
--
Posted via http://www.ruby-forum.com/.
2008 Nov 23
1
tklistbox - R-Objekt
Hello, I have a problem with a tklistbox. The user should be able to choose
one out of two calculation methods needed for further calculations. My
r-script for that purpose looks like that:
require(tcltk)
tt<-tktoplevel()
tl<-tklistbox(tt,height=4,selectmode="single",background="white")
tkgrid(tklabel(tt,text="select method for LAI
2007 Dec 08
3
Multiple Worker Methods on Different Schedules
Quick question: If I want to schedule different worker methods defined in
the same worker to trigger at different times, is this possible? Would the
following scheduler yaml work?
:schedules:
:foo_worker:
:worker_method: method1
:trigger_args: 0 */10 * * * * *
:job_key: some_key_1
:foo_worker:
:worker_method: method2
:trigger_args: 0 */15 * * * * *
:job_key:
2011 Aug 16
2
how to get the result in "short cut" manner?
Hi all:
My data:data(sleep)
If I wanna calculate each group's extra,what I can do is:
#method1
attach(sleep)
mean(extra[group==1])
mean(extra[group==1])
#method2
result<-matrix(,0,2)
g<-split(sleep,sleep$group)
for(i in 1:length(g))
{
result<-rbind(result,data.frame(unique(g[[i]]$group),mean(g[[i]]$extra)))
}
colnames(result)<-c("name","mean")
But the above
2001 Apr 25
6
Updated partial auth patch against CVS
Here is a new version of my partial auth patch against the April 24, 2001
CVS image. It fixes a couple of things (thanks to Karl M
<karlm30 at hotmail.com>), and includes support for hostbased auth. It's still
not pretty, but it works. 2 things Karl mentioned aren't fixed:
- auth methods are still hard-coded into servconf.c. Fixing this would
require a lot of work, and all the
2006 Jan 26
3
global objects?
Forgive the term global if that''s not applicable in rails (i come from a
php background)
I have a browse controller with a couple of different methods
def method1
@properties = Property.find_all
#other stuff for that method
end
def method2
@properties = Property.find_all
#other stuff for that method
end
def method3
@properties = Property.find_all
#other stuff for that method
end
I
2006 Apr 22
3
Creating a select dropdown box with links to methods
What would be the best way to create a form select dropdown box and upon
"submit" have it directly go to a controller method view?
I have something that somewhat works, but I think there is probably a
much easier way to do it. As of now, I have the dropdown list which
when the form is submitted is handed to a controller method which
basically
I have my dropdown box:
<%=
2006 Jun 22
1
Change of controller name and SEO issue
Hi,
I developed an app with cetain controller names. Now that the app is
catching up I''m trying to change the controller names to be better aligned
with the business.
This is what I have now.
http://localhost/foo/method1
http://localhost/foo/method2
http://localhost/foo/method2/a
http://localhost/foo/method2/a/b
http://localhost/foo/method2/a/b/c
http://localhost/foo/method3
I would
2003 Oct 22
1
How to reformat data from database into data.frame?
I'm trying to find a clever way to re-map data from a database
query into a data.frame.
Querying a database often returns a table (data.frame) like this:
GeneID MethodID Value
6 1 123
6 2 456
6 3 987
7 1 234
7 3 432
8 2 190
8 3 34
8 1 864
Note that GeneID=7 doesn't have a value for MethodID=2.
Note that GeneID=8 doesn't have the
2011 Nov 17
1
how to read a free text file into individual variables
hi ,I am writing a soft package based on R.
But when I try to read a configure file showed as below.
How can I read the parameter in this text file.
How can I read the parameter into each variable in this file ?
configinfo<-scan(file(configfile),ok=TRUE,n=-1)
scan seems need every line have same column ?
configinfo <- readLines(configfile,ok=TRUE,n=-1)
methodnum <-
2007 Aug 31
48
Deprecating the mocking framework?
I saw in one of Dave C.''s comments to a ticket that "our current plan
is to deprecate the mocking framework." I hadn''t heard anything about
that, but then again I haven''t paid super close attention to the list.
Are we planning on dumping the mock framework in favor of using Mocha
(or any other framework one might want to plug in?).
Pat
2007 Aug 10
1
[Fwd: Re: How to apply functions over rows of multiple matrices]
[Apologies to Gabor, who I sent a personal copy of the reply
erroneously instead of posting to List directly]
[...]
> Perhaps what you really intend is to
> take the average over those elements in each row of the first matrix
which correspond to 1's in the second in the corresponding
> row of the second. In that case its just:
>
> rowSums(newtest * goldstandard) /
2007 Aug 09
1
How to apply functions over rows of multiple matrices
Dear ExpRts,
I would like to perform a function with two arguments
over the rows of two matrices. There are a couple of
*applys (including mApply in Hmisc) but I haven't found
out how to do it straightforward.
Applying to row indices works, but looks like a poor hack
to me:
sens <- function(test, gold) {
if (any(gold==1)) {
sum(test[which(gold==1)]/sum(which(gold==1)))
} else NA
}
2009 Nov 06
2
mini_magick - 2 clarifications
1. I have seen examples similar to the following:
image = MiniMagick::Image.from_file("input.jpg")
image.resize "100x100"
image.write("output.jpg")
I''m assuming that image.resize is a method. Is there any significance
to the fact that the argument for that method is not enclosed in
parenthesis while the other are? Examples seem to be consistent --
2007 Nov 13
5
how to ensure signature compliance while mocking in ruby
On 13/11/2007, Pradeep Gatram <pradeep.gatram at gmail.com> wrote:
>
> Let me put my dilemma as an example. Take a look at a snippet from
> FooTest.
>
> #using mocha
> def test_method1
> Bar.expects(:method2).with(''param1'', ''param2'').once
> Foo.method1
> end
>
> And now the implementation
>
> class Foo
> def