Displaying 10 results from an estimated 10 matches for "stuff2".
Did you mean:
stuff
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 <- c("list","of","something")
actualObject.stuff2 <- c("list","of","something other thing")
printThis(actualObject) # actual call...
2009 Jun 03
3
Return variable assignments from a function
...e even toyed with the superassignment operator, which also works, but I
think it doesn't work for functions of functions. The following example
works.
=================================
simple2 <- function(m,n) {
A <<- matrix(c(3,3,2,3),2,2)
B <<- m
c <<- 1:n
}
> stuff2=simple2(2,3)
> stuff2
[1] 1 2 3
> A
[,1] [,2]
[1,] 3 2
[2,] 3 3
> B
[1] 2
> c
[1] 1 2 3
=================================
In the example below, I call the function ten inside the function nine. I'm
expecting that the variable b should change only in the function n...
2014 Jul 28
0
lattice, latticeExtra: Adding moving averages to double y plot
...ot an experienced lattice user). I want to keep the data points in the plot.
Find below dummy data and the script as well as annotations further describing my question.
thank you in advance!
Anna Zakrisson
mydata<- data.frame(
Year = 1980:2009,
Type = factor(rep(c("stuff1", "stuff2", "stuff3"), each = 10*3)),
Value = rnorm(90, mean = seq(90),
sd = rep(c(6, 7, 3), each = 10)))
library(Lattice)
library(LatticeExtra)
stuff1data <- mydata[(mydata$Type) %in% c("stuff1"), ]
stuff12_3data <- mydata[(mydata$Type) %in% c("stuff2&...
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
===============================
Dr. Jim Maas
University of East Anglia
[[alternative HTML version deleted]]
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/* --exclude=/proc/*
--exclude=/var/tmp/* --exclude=/usr/portage/distfiles/*
--exclude=/home/*/.thumbnails/* --exclude=.mozilla/**/Cache/*
--exclude=.svn/* xxxxxx.dyndns.org:/ /usr/backups/data/u2.current/...
2005 Sep 15
1
Javascript object literals -- prototype clash?
...g to use a javascript object literal definition that looks
something like this:
var forms = {
form1: {
input_line1: {
name: ''stuff1'',
size: ''30'',
type: ''text'',
value: ''Init string for stuff1''
},
input_line2: {
name: ''stuff2'',
size: ''30'',
type: ''text'',
value: ''Init string for stuff2''
}
},
form2: {...}, ...
}
Within the form generation javascript routine, I have:
var input_list = forms[form_type];
for (var i in input_list) {
form = form + ''<in...
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 Feb 26
3
err:module:map_image
...onfig file looks like
# Start ~/.wine/config
WINE REGISTRY Version 2
;; All keys relative to \\Machine\\Software\\Wine\\Wine\\Config
[Drive C]
"Path" = "/mnt/c"
"Type" = "hd"
"Filesystem" = "vfat"
[Drive D]
"Path" = "/mnt/stuff2"
"Type" = "hd"
"Filesystem" = "vfat"
[Drive E]
"Path" = "/mnt/stuff3"
"Type" = "hd"
"Filesystem" = "vfat"
[Drive F]
"Path" = "/mnt/cdrom"
"Type" = "cdrom&quo...
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 =