search for: chesney

Displaying 12 results from an estimated 12 matches for "chesney".

Did you mean: cheney
2011 Dec 12
3
For loop indicies
I would like to run a for loop with an index going from 0 to 499 but the following seems to miss out the first value: C <- 499 for (i in 0:C) The alternative is: C <- 500 for (i in 1:C) { #Then every time I use i, I replace it with i-1 } Is this a good way to do it or is tere a better way? Thank you, ThomasThis message and any attachment are intended solely for the addressee and may
2011 Jun 24
1
Installing packages
...erenced from: /Library/Frameworks/R.framework/Versions/2.12/Resources/library/network/libs/i386/network.so Reason: image not found In addition: Warning message: package 'network' was built under R version 2.13.0 Error: package/namespace load failed for 'network' Thank you Thomas Chesney University of Nottingham -- View this message in context: http://r.789695.n4.nabble.com/Installing-packages-tp3621986p3621986.html Sent from the R help mailing list archive at Nabble.com.
2013 Mar 08
1
Ports
...n't know where to find it or how to get it. I guess my computer knows this info - it knows where it's trying to connect to - but I don't know how to get at it. Source IP addresses (I know this one) Destination IP addresses Protocols and ports Any advice/info appreciated. Thomas Chesney University of Nottingham This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained...
2012 Jun 25
1
Replacing text with a carriage return
...here in the file around record_start already. Even if the double quotes weren't there though, I'm still not sure this would work. (BTW, I can live with the first incorrect comma in the output file because I can just remove it manually.) Can anyone suggest a solution? Thank you, Thomas Chesney This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in an...
2011 Dec 07
2
arules package intsallation
I'm using R version 2.13.0 (2011-04-13) on Mac OS X and I get the following error message with library(arules): Loading required package: Matrix Loading required package: lattice Attaching package: 'Matrix' The following object(s) are masked from 'package:base': det Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object
2011 Jun 27
1
Upgrading R
Is there any easy way I can upgrade R without losing all of my packages, when I'm using a computer (Mac) on an organisation's network which blocks the package installer? Thank you, Thomas -- View this message in context: http://r.789695.n4.nabble.com/Upgrading-R-tp3627205p3627205.html Sent from the R help mailing list archive at Nabble.com.
2011 Dec 06
1
Writing out in loops
I would like to write some data to different files. I can create the filename Day1.txt like this: filen <- paste("Day", l, ".txt", sep="") and then I'm using a For loop to write out one row of a matrix, something like this: For (j in 1:10) { cat(mat[1,j], ",", file=filen, append=TRUE) } cat("\n", file=filen, append=TRUE) but is there
2011 Sep 01
2
Automatic Recoding
...26278 676529098667 98928373 1092837363526 716172829 would become: 0 1 0 2 0 3 0 4 5 6 i.e. all 676529098667 would become 0, all 1000198767829 would become 1 etc. If I read all the values into a matrix, is there a pre-existing function that can do the recoding? Thank you! Thomas ChesneyThis message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any...
2011 Jul 16
1
Max within groups
I know there's a really easy way to do this but I just can't track it down. I experimented with various apply functions but couldn't get it quite right. I have a matrix like this: 1, 16 1, 23 1, 21 1, 6 1, 25 2, 4 2, 17 2, 45 2, 11 2, 20 and I'd like to find the max value in Column 2 (or the index to the max value) grouped by the first column. So the max for Group 1, the max for
2011 Oct 06
3
Running *slow*
Anyone got any hints on how to make this code more efficient? An early version (which to be fair did more than this one is) ran for 330 hours and produced no output. I have a two column table, Dat, with 12,000,000 rows and I want to produce a lookup table, ltable, in a 1 dimensional matrix with one copy of each of the values in Dat: for (i in 1:nrow(Dat)) { for (j in 1:2) { #If next
2012 Aug 21
2
Entering a table
I'm trying to enter a frequency table manually so that I can run a goodness of fit test (I only have the frequencies, I don't have the raw data). So for example, let's say I want to re-create the HorseKicks table: library(vcd) data(HorseKicks) str(HorseKicks) 'table' int [1:5(1d)] 109 65 22 3 1 - attr(*, "dimnames")=List of 1 ..$ nDeaths: chr [1:5]
2012 Feb 02
1
Writing out data
What is the best way to write out comma separated data, as a program is running (rather than waiting to the end using write.csv)? At the moment I'm doing this, but I guess it's not the most efficient. The data is in a column in the matrix postcount, and I'm using a loop to write out each of the 100 elements. for (j in 1:100) { cat(postcount[1,j], ",", file=filename,