Displaying 20 results from an estimated 300 matches similar to: "Javascript object literals -- prototype clash?"
2010 Dec 22
2
how to pass object "members" in functions
Hello,
This is an R-syntax question when attempting to manipulate/access objects
when passed to a function.
I have a function attempting to just print values attached to an argument
object. For example,
printThis <- function(obj, parm2, parm3) {
print(obj.stuff1)
print(obj.stuff2)
}
where I've assigned stuff1 and stuff2 to the actual object passed as such
actualObject.stuff1 <-
2014 Jul 28
0
lattice, latticeExtra: Adding moving averages to double y plot
Hi lattice users,
I would like to add 5-year moving averages to my double y-plot. I have three factors needs to be plotted with moving averages in the same plot. One of these reads off y-axis 1 and two from y-axis 2. I have tried to use the rollmean function from the zoo-packages, but I fail in insering this into lattice (I am not an experienced lattice user). I want to keep the data points in
2010 Sep 16
5
using variable from for loop in naming new variables
Simple one here ... but can't get it to work ...
for (i in 1:4){
paste("stuff",[i]),sep="") <- 3 + i
}
ls()
rm(list=ls())
I just want it to create 4 new variables called stuff1, stuff2, stuff3, stuff4 with the corresponding assignments. I realise that there are more elegant functions but this is just a model of a bigger situation.
Thanks
Jim
2007 Aug 02
4
ActiveRecord Limitation (Advance)
Or is it ?
Need to be able to :-
@search =
Form.find(:all, :include=>[:form_type, :form_type_items], :conditions=>....)
I need in the Form model a :form_type_items, the question is, what is
the relationship type?
Current Models:-
Form
belongs_to :form_type
FormType
has_many :form_types
has_many :form_type_items
FormTypeItem
Belongs_to :form_type
Form
----------------
| id |
2014 Mar 18
0
XMPP issues in Asterisk 11.6.0 for distributed device states...
I have been working with distributed device states in Asterisk using XMPP
attached to an OpenFire server. I have it working well across two servers
and want to roll it out across every server in my company. All servers are
Asterisk 11.6.0. I am running into a problem that seems like it should be
a bit easier to solve than it is seeming to be. On the third server I am
rolling into this
2006 Mar 12
1
Problem with --partial and rsync algorithm
Hi,
I'm running the following command for a remote host backup:
/usr/local/bin/rsync -a --delete --delete-excluded -v --timeout=120 -z
--no-whole-file -partial --partial-dir .rsync-partial --exclude=/sys/*
--exclude=/tmp/* --exclude=/stuff/distfiles/* --exclude=/stuff/sistema/*
--exclude=/stuff2/ftp/* --exclude=/stuff2/backup/* --exclude=/home/ftp/*
--exclude=/home/gentoo/* --exclude=/mnt/*
2009 Jun 03
3
Return variable assignments from a function
I'd like to perform return variable assignments like matlab. For example,
the following function would return A, B, and c to the script that called
it.
=================================
function [A,B,c] = simple(m,n)
A=[ 3 2; 3 3]
B=m
c=1:n
=================================
I'd like to do similar assignments in R, but I seem to be able to only
return one variable. I tried to use a
2009 Feb 04
1
location of temporary files in deliver
deliver has the following:
-- -- --
/* After buffer grows larger than this, create a temporary file to /tmp
where to read the mail. */
#define MAIL_MAX_MEMORY_BUFFER (1024*128)
...
static struct istream *create_raw_stream(int fd, time_t *mtime_r)
...
input = i_stream_create_seekable(input_list, MAIL_MAX_MEMORY_BUFFER,
2011 Jun 23
0
Loops, Paste, Apply? What is the best way to set up a list of many equations?
Is there a way to apply paste to?list(form1 = EQ1, form2 = EQ2, form3 = EQ3, form4 = EQ4)?such that I don't have to write form1=EQ1 for all my models?(I might have a list of 20 or more)? I also need the EQs to read the formulas associated with them.
For example, below, I was able to automate the name assignment but I could not figure out how to?to set up the list using?paste or other
2012 Mar 25
2
Modal dialogs getting out of focus
Hello,
it is really nice to be here with the wonderful Wine community.
Modal window gets out of focus if minimized and blocks any actions in the main
window.
I've attached and example created in Delphi called Project1. It has Form1
window with action button which opens a modal dialog called Form2.
The main idea is when opened Form2 to be always on top and to be impossible to
hide it behind
2013 Feb 26
1
problem with nested loops
Each of the data sets contains monthly observations on price indices for 7 countries. I use the fitted values from reg1 in the reg2 model. The interior loop executes without error as long as I explicitly specify the data set, i.e. data=dat70. However the code fails to execute if I specify the model in the form of the commented line, i. e reg1 <-dynlm(form1,data=Dnames[j])
I get the following
2011 Jun 21
1
Setting up list of many equations for systemfit
Dear List Members,I am trying to set up a large system of equations and I am trying to find a simple way to set up the list command under the package system fit. Here is the example from system fit and what I am trying to do:
EQ1 <- Y1 ~ X1 + X2 + X4EQ2 <- Y2 ~ X2 + X3EQ3 <- Y3 ~ X2 + X3 + X4EQ4 <- Y4 ~ X1 + X3 + X4eqSystem <-list(form1 = EQ1, form2 = EQ2, form3 = EQ3, form4 = EQ4)
2003 May 07
21
Replacing WinNT 4 PDC with Samba PDC
Hi All!
Thanks to all of you that responded to my previous posts. I've gotten a lot
more info now than I used to have!
But I still have questions. The biggest right now is: Is there a way build
up a Samba PDC as a direct replacement for an existing Windows NT 4.0 PDC?
All the material I've found to date is written from a standpoint of creating
a new domain as you create the Samba
2012 Apr 01
1
indexing in a function doesn't work?
Hello,
I've written a small function that's supposed to save me some time, and
it's ending up killing it- the intention is to iteratively subset a dataset
fram on framevec, fit a model (either lm or nls depending on type) and
return the r2 or AIC from the model, respectively. Although as far as I can
tell in my code the plots are dependent on the fit of the model to the data
and the
2007 Mar 19
1
Forms lost focus in KDE
Hello,
I'm testing a simple delphi application that have 3 forms.
>From FORM1 (the main form) I press a button to show FORM2, then from
FORM2 I press a button to show FORM3, when I close FORM3, FORM1 becomes
focused instead of FORM2.
Every time you close a form or a dialog the application main form
becomes the active one.
This only happend in KDE, allowing windows manager to control the
2008 Apr 23
1
pdf() and histogram() in function call
Here is a function I wrote. It runs no problem, but generate empty pdf
files.
I can't find what is the problem.
create.pdf<- function(x, dir)
{
dir.create(dir, showWarnings = FALSE)
plist<- c("a", "b" , "c", "d")
for(j in plist)
{
filedir<- paste(dir, "/", j, ".pdf",
2006 Jan 17
1
Step.glm() question
Hi:
I am using step.glm() as follows:
form1 <- as.formula(haspdata ~ 1)
lg.mod1 <- glm ( formula=form1, data=st.mtx,
family=binomial , na.action=na.omit )
upper <- as.formula( haspdata ~ (
c5+childnm+educ1+incpov1+marital+msa+racekid+racemom+sex+shotcard )^2)
lower <- as.formula(haspdata~1)
lst <- list( upper=upper , lower=lower )
form1a.step <- step(lg.mod1, scope=lst
2006 Nov 23
3
Prototype Safari onSubmit Issues
Hi folks. Another Prototype question.
I have a simple ajax form which I want to return results on an
onChange. Works in IE6 (Win) and FF, but Safari doesn''t seem to take
the onChange too well. Upon the return key, it blanks out the form.
Upon tabbing to the next field (actually the next form), I get the
results.
<form name="form1" id="form1"
2008 Oct 30
1
Trying to "expand" some data - Newbie needs help
I want to calculate "expansion factors" for elements in my dataframe
based on a 2-d cross classification. Since I'll have "missing values"
(many combinations will have no record) I'll need a second "expansion
factor" for each "row". I've included my "work to date" below, but I'm
not very close to getting this right.
My
2006 Mar 29
1
Help: Input of form 1 to hidden field in form 2?
Hi all I''m new to rails an i''m trying to build a step by step form /
process to gather data. For example:
form one:
User enters a 8 digit number
the submit button points to form 2.
form two:
the 8 digit number from form one becomes a hidden field in form 2.
The problem I have is that the entire hash from form 1 is showing up in
form two rather than just the input data.