similar to: More issues with apply

Displaying 20 results from an estimated 300 matches similar to: "More issues with apply"

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 Sep 24
2
Calling object outside function
What i thought was a simple process isnt working for me. After i create an multiple objects in a function (see below), how to i use those objects later in the program. I tried calling the function again and then the object i wanted and it worked the first time but now it doesnt( i think i defined the object outside the function accidently so then it worked but when run properly it doesnt). I
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
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
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,
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 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
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)
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
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
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"
2008 May 02
2
FAQ: setting thunderbird to talk to dovecot
Let's say I have a postfix box, named mail.thespider.com, which is setup to handle virtual mailbox domains. One of these domains will handle is, thespider.com, and my email address in that domain is boris at thespider.com. As I setup dovecot, I can telnet to the pop3 port (110) and test it by logging in as boris at thespider.com (I would try the imap port but I do not know how to login to imap
2008 Nov 26
1
Creating a vector based on lookup function
I am still searching for a solution to what i think is a simple problem i am having with building a vector in a for loop. I have built a more understandable example so hopefully that will help..help you, help me, if you know what i mean. dev=400 #test location model TAZs to reference cands=c(101,105,109) #Create Object of length of cands candslength=length(cands) #TEST TAZ Vector
2011 Oct 03
2
Bug#644125: xenstore-utils has completely inadequate description
Package: xenstore-utils Version: 4.0.1-2 all it says is: "Description: Xenstore utilities for Xen This package contains the Xenstore utilities." Wow, i never would have guessed that a package called xenstore-utils might contain Xenstore utilities. I'm glad that's cleared up! that just leaves a few tiny, niggling questions: 1. WTF are the Xenstore utilities? 2. What are
2008 May 18
1
can't install "Nokia Pc Suite"
I have this error, but there are no directory "Nokia PC suite 6' create !! err:msi:HANDLE_CustomType34 Unable to execute command L"\"C:\\Program Files\\Nokia\\Nokia PC Suite 6\\PcSync2.exe\" /CloseOther" fixme:msi:msi_unimplemented_action_stub MigrateFeatureStates -> 11 ignored L"Upgrade" table values preloader: Warning: failed to reserve range
2003 Apr 04
1
hypatia problems?
Dear all Off topic to some extent but Ted Harding has just called me to say he is (a) seeing large delays in the list messages when it is sent internally from hypatia.math.ethz.ch. I get only a delay of an hour which is reasonable in the scrap below but Ted reports delays of the order 24 hours, (b) messages he has sent to the list don't appear on it for a long time. Is anyone else
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"
2003 Jun 02
6
Building an R package under Windows NT
I am trying to build a R 1.7 package under Windows NT. I created the DESCRIPTION file, the RD file and added the code to the R folder. I also downloaded and installed the Rtools package and have Perl 5.0. I know that Perl, Miktex, and gcc are working. I also have my PATH variable set correctly. I can fake install my package by removing the *.R from the code file, using Rcmd Rdconv to create