Displaying 20 results from an estimated 400 matches similar to: "how to pass object "members" in functions"
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
2002 Oct 23
3
How to pipe debugmsg to a file?
Is there a wine option to send the log output to a file?
I'm doing the following:
wineconsole --debugmsg +all program_name parm1 parm2 parm3 > /mylog.txt
mylog.txt is not receiving a copy of the millions, nay billions!, of
messages output.
I'm using Redhat 7.3 and the 10/07/2002 RPMs.
- Bill
2006 Aug 10
1
Passing parameters defined in a function or something
Hi,
I have method I want to call ... it can receive * number of parameters.
I also have 3 parms that I want to pass often, so I have defined them in
a separate function:
def my_params
{ :parm1 => 1, :parm2 => 2, :parm3 => 3 }
end
And I want to call my method like this:
mymethod :parm4 => 4, my_params
Now - this doesn''t work - as my_params is a hash of params, which
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
2005 Sep 15
1
Javascript object literals -- prototype clash?
I''ve been playing with some ideas in getting the server-side Rails code and
client-side AJAX stuff working nicely together while still providing
fallback for non-js viewers. I''m using Behaviour + prototype.
I was experimenting with using an object literal to define forms that would
be inserted into appropriate divs. Why not just write the forms on the
server side and unhide
2004 Nov 08
3
location of key in panels of trellis plot
Hi,
I want to insert a key into each panel of a trellis plot, which I can do
with a custom panel function that calles draw.key. The problem arises
because I want the top right hand corner of the key to start in the top
right hand corner of the panel. If you run my code below, you can see that
the key appears in the center of each panel. This is because the default
viewport in draw.key is the
2007 Oct 01
1
saving and loading complex objects
Dear Sir:
When I try to save large and very complex recursive objects with some components containing models (such as the output from arima or lm ),
the resulting file sizes increase by 4 meg per save.
example directory:
amex 8 meg
argentina 12 meg
australia 16 meg
...
Moreover, I am unable to read these file objects back into R.
I note that readBin and writeBin
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
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
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
2002 May 22
5
plotting a 1000 plots?
I would like to plot lots of plots (2x2 plots) of a set of data for many
sets. I can do it just fine for one set of data, but I would like to
generate a small mountain of plots for others to examine. Basically, I would
like to generate the same par( mcol=c(2,2) ) plot for about 1000 datasets.
I've been iterating through them in the plot window, but I would like to
send all the plots to a eps
2009 Jul 12
11
get DB data to rhtml file
I am trying to get data out of a database to my rhtml file. The files
look like this:
Model
-------
mystuff.rb
class Mystuff < ActiveRecord::Base
set_table_name "mytable"
set_primary_key "id"
end
Controllers
--------------
mystuff_controller.rb
require ''Mystuff''
class MystuffController < ApplicationController
def read
@me =
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/*
2002 Feb 26
3
err:module:map_image
Hi there,
I'm trying to get the game Halflife working with Wine.
I downloaded the latest Wineversion with CVS.
I built it with :
# ./configure --prefix=/usr/wine --enable-opengl
# make depend && make && make install
Then I insert the halflife cdrom and do:
# mount /mnt/cdrom
# cd /mnt/cdrom
# wine SETUP.EXE
It loads up the Halflife install wizard (progressbar goes from 0 to
2013 May 08
7
Si R viniera en el Diccionario...
Buenas tardes:
Aprovechando la vena lingüística que estamos demostrando tener últimamente, y en consonancia con labores de documentación que me ocupan en estos días, quiero consultaros acerca de cómo definir a R. Yo lo definiría como entorno más que como sistema estadístico, pero ¿realmente qué es lo más correcto si buscamos el rigor?.
Gracias.
Atte.- Eva
[[alternative HTML version deleted]]
2010 Dec 23
2
python-like dictionary for R
Hi,
I was wondering if anyone has played around this this package called
"rdict"? It attempts to implement a hash table in R using skip lists. Just
came across it while trying to look for simpler text manipulation methods:
http://userprimary.net/posts/2010/05/29/rdict-skip-list-hash-table-for-R/
Cheers,
Paul
[[alternative HTML version deleted]]
2010 Feb 19
1
order two dataframes by an integer column from either data frame
Hi,
I'm an R nooob! So please pardon this easy question!
I have two data frames that share a common column, data1.name and data2.name.
How would I be able to order the other based on an integer column from
either data frame?
For example, how do I order data2 based on data1.age? Or data1 based on
data2.salary?
Thanks!
Paul
--
Paul Rigor
Pre-doctoral BIT Fellow and Graduate Student
2013 Apr 10
2
[LLVMdev] Passing DW_TAG_typedef as the type to DIBuilder's createFunction
Hi Eric,
On 10/04/13 00:20, Eric Christopher wrote:
> On Tue, Apr 9, 2013 at 1:53 AM, Duncan Sands <baldrick at free.fr> wrote:
>> Hi David, I'm seeing an assertion failure when passing this node
>>
>> !{i32 786454, metadata <badref>, metadata <badref>, metadata !"fn_t", i32
>> 5, i64 0, i64 0, i64 0, i32 0, metadata <badref>} ;
2013 Apr 16
2
[LLVMdev] Passing DW_TAG_typedef as the type to DIBuilder's createFunction
On Mon, Apr 15, 2013 at 6:20 PM, David Blaikie <dblaikie at gmail.com> wrote:
> On Wed, Apr 10, 2013 at 4:48 AM, Duncan Sands <baldrick at free.fr> wrote:
>> Hi Eric,
>>
>> On 10/04/13 00:20, Eric Christopher wrote:
>>>
>>> On Tue, Apr 9, 2013 at 1:53 AM, Duncan Sands <baldrick at free.fr> wrote:
>>>>
>>>> Hi David,
2013 Apr 16
0
[LLVMdev] Passing DW_TAG_typedef as the type to DIBuilder's createFunction
On Wed, Apr 10, 2013 at 4:48 AM, Duncan Sands <baldrick at free.fr> wrote:
> Hi Eric,
>
> On 10/04/13 00:20, Eric Christopher wrote:
>>
>> On Tue, Apr 9, 2013 at 1:53 AM, Duncan Sands <baldrick at free.fr> wrote:
>>>
>>> Hi David, I'm seeing an assertion failure when passing this node
>>>
>>> !{i32 786454, metadata