Displaying 20 results from an estimated 500 matches similar to: "Calling object outside function"
2008 Sep 30
1
conditional loop
I am looking up a number based upon a randomly selected number and then
proceed to the rest of my code if the corresponding value is greater than or
equal to yet another value.
so if
Dev_Size = 14
and my randomly selected number is 102
and i am looking up 102 in the following table
100 21
101 4
102 9
103 52
104 29
So i select the the corresponding value of 102, which is 9 and
2008 Dec 12
1
Creating a vector
Good day all,
I am having seom trouble building a simple vector. Below my sample code
shows what ime trying to do and i have pointed out where the issue is. What
happens not is that a single "TAZDetermine_FEET" is selected by i need
multiple values, as many as there are "cands". I am thinking that this
should occur within the for loop and add a
2008 Nov 25
2
creating a new vecotr in a for loop
I have consulted the intro and nabble but have not found an answer to what
should be a simple question, here goes:
I am doing a crosscheck of a data frame and pulling out a single value based
on an inputted value ie based on x i will select y, or if x =2 then my code
returns 7.
x y
1 4
2 7
3 10
4 2
My code currently iterates through for as many times as the length of the x
2009 Mar 26
2
loading and manipulating 10 data frames-simplified
I have to load 10 different data frames and then manipulate those 10 data
frames but would like to do this in a more simplified code than what i am
doing. I have tried a couple of approaches but cannot get it to work
correctly.
So the initial (bulky) code is:
#Bin 1
#-------
#Loads bin data frame from csv files with acres and TAZ data
Bin1_main <-
2008 Nov 07
1
For Loop - loading 10 sets of data and calculating
I am trying to simplify my code by adding a for loop that will load and
compute a sequence of code 10 time. They way i run it now is that the same
8 lines of code are basically reproduced 10 times. I would like to replace
the numeric value in the code (e.g. Bin1, Bin2....Bin10) each time the loop
goes around. Below i tried doing this with a simple for loop and adding the
string character before
2009 Jan 24
1
Environment change?
So i have a simple question that doesnt require sample code, not sure if that
violates posting rules or not.
Is this:
[1] "111" "112" "113" "114" "115" "116" "118" "119" "120" "123" "125" "126"
[13] "127" "128" "132" "137"
2012 Apr 03
2
Grouping and/or splitting
I have a dataframe imported from csv file below:
Houseid,Personid,Tripid,taz
1,1,1,4
1,1,2,7
2,1,1,96
2,1,2,4
2,1,3,2
2,2,1,58
There are three groups identified based on the combination of first and
second columns. How do I split this data frame?
I tried
aa <- split(inpfil, inpfil[,1:2])
but it has problems.
Output desired is
aa[1]
Houseid,Personid,Tripid,taz
1,1,1,4
1,1,2,7
aa[2]
2009 Apr 29
2
Re moving unwanted double values in list
I have a procedure that goes sorts out some numbers based on specidifed
criteria and for some reason the list contains double values in some of the
rows such as:
TAZs <-
[[84]]
[1] 638
[[85]]
[1] 643
[[86]]
[1] 644 732
[[87]]
[1] 651 801
i would like to check list TAZs for double values and remove any if present.
I have tried
if (length(TAZDs==2))
rm(TAZDs[2])
but no luck. I cant
2010 Feb 23
1
select row based on highest value
Please consider the following
#Data to use
Props<-c("p754921","p754921" ,"p754921","p75506" ,"p75506"
,"p75506","p75506","p75508","p75508","p75508","p75508","p75508")
TAZ<-c(38,37,37,171,171,282,171,46,46,169,169,169)
Area<-c(109828.04, 128134.71, 46469.57,
2012 Jan 13
2
More issues with apply
Hi all,
Please consider the following:
DataSet1.. <-
data.frame(Bldgtype=c("SFDM","SFDM","SFDM","SFDM","SFDM","SFDM","APT"),
Taz=c("254","254","254","564","564","564","564"),stringsAsFactors = FALSE)
PeriodResType_Zx <-
2010 May 28
1
Data frame manipulation
Hello All,
Please consider the following:
TotEmp<-c(19,6,1,1,8,44,2,33,48,1)
ClusterType<-c("AGF","CNS","OSV","RTL","RTL","TRN","REL","ACC_CLUST","RTL","WHL")
Taz<-c(0,0,0,100,100,100,101,101,102,103)
2010 Jan 21
2
Create a multi dimensional array from a data frame
Hello all,
I have data from a csv that i need to coerce into a multi dimensional
array. As you can see from my sample code i have yet to master building
efficient code. I can sort of do what i want but its very cumbersome code
and i know there is a better way to do it, i am just not expereinced enought
yet. So for the following:
#Create Data
h1i1a1<-sample(1:20, 5, replace=TRUE)
2004 Jul 12
2
Problem with wine and Photoshop 7.0
To start off here is my version:
drew@taz:~/downloads
[14:26:56] -> wine -v
Wine 20040505
When I run photoshop like this:
wine "C:\\Program Files\\Adobe\\Photoshop 7.0\\Photoshop.exe"
I get a little window form with an "OK" button that has "Adobe Photoshop
7.0" as it's title.
I click OK, and it quits out.
Any suggestions ?
- Drew
2009 Sep 14
2
[PATCH node-image] add livecd-iso-to-iscsi script to support iscsi root booting setup
This enables the ability to take the ovirt-node-image iso and deploy it to an iscsi disk. It also provides a sample pxe configuration for booting based on the iscsi root device. Includes support for user/password as well as reverse chap user/password.
---
Makefile.am | 1 +
livecd-iso-to-iscsi | 201 ++++++++++++++++++++++++++++++++++++++++++++++
ovirt-node-image.spec.in |
2012 Jan 31
2
[PATCH 1/2] examples: code cleanups
do a code cleanup by removing the tailing spaces
Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com>
---
examples/create_disk.c | 2 +-
examples/inspect_vm.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/create_disk.c b/examples/create_disk.c
index f4b9044..bcad6d8 100644
--- a/examples/create_disk.c
+++ b/examples/create_disk.c
@@ -7,7 +7,7
2018 Mar 27
1
Shading specific region in R
Dear useRs,
Following the given codes below, I generated a plot that has 6 regions around a center point (IL), with 5 regions containing
a point (L1, L2 to L5) and sixth vacant region. I want background of all the filled regions turned "green", while "red" for the
vacant region. Can it be done through a quicker way?
Thanks in advance
###Codes start from
2010 Feb 22
1
matching on two criteria
Howdy y'all,
I am looking to use the match function to match a data attribute to another
data frame but i need it to do so on two criteria to ensure an appropriate
match. The following matches incorrectly. I know the example looks
pointless but its just an example. Perhaps there is another way of doing
this? Thanks
#Sample Data
Props<-c("p754921","p754921"
2006 Dec 05
4
Attended Transfer
Dear List,
I've been working with Asterisk CVS-v1-0-09 and i'm trying to enable
attended transfer feature. but i just can't do it work. I've already
set "atxfer = *" (and many other combinations) and all extensions on
extensions.conf have the t and T option. But when I'm going to test,
it doesn't work. Is there any other file that i have to configure in
order to
2004 Sep 24
2
kernel: Power alarm on module 1, resetting!
I've installed a TDM04B and a TDM40B. I haven't plugged any lines
into them yet but I'm starting to see this in my logs...
[root@webster asterisk]# grep alarm /var/log/messages
Sep 20 09:13:22 webster kernel: Power alarm on module 1, resetting!
Sep 22 11:07:07 webster kernel: Power alarm on module 1, resetting!
Sep 22 16:10:55 webster kernel: Power alarm on module 1, resetting!
Sep
2013 Aug 19
2
Problemas con ggsave(paste('img/',plotName,'.png', sep='')
Estimados usuarios de R:
Soy nuevo en R, le ruego disculpa por mi *Ignorancia*.
Estoy corriendo la siguiente instruccion,
ggsave(paste('img/',plotName,'.png', sep='')
y resulta el error:
ggsave(paste('img/',plotName,'.png', sep='')
Saving 7.32 x 4.87 in image
Error in grDevices::png(..., width = width, height = height, res = dpi, :