similar to: Iterating over file lines

Displaying 20 results from an estimated 11000 matches similar to: "Iterating over file lines"

2001 Oct 02
1
problem with while loop with next (was RE: file connection, w hile, readLines and browser)
Dear R-help, I think I have kinda isolated the problem I had to the following: i <- 0 while( {i <- i + 1} < 5) { if(i < 3) next print(i) } This seems to go into an infinite loop. After I break the execution, i has the value 1. At the R prompt, if I start from i <- 0 and keep typing {i <- i + 1} < 5, it eventually evaluate to TRUE. So why does the while loop not work?
2001 Oct 02
1
RE: problem with while loop with next
Prof. Tierney, Thanks very much for the info. Why does the loop work if I move the assignment out of the condition? E.g., the following works: i <- 0 while(i < 5) { i <- i + 1 if(i < 3) next print(i) } Regards, Andy > -----Original Message----- > From: Luke Tierney [mailto:luke at nokomis.stat.umn.edu] > Sent: Tuesday, October 02, 2001 3:36 PM > To: Liaw, Andy
2006 Dec 29
2
Binary AGI Scripts
Hi Everyone, I'm wondering if anyone here write AGI's in compiled binaries. I'm writing a small Cepstral AGI in Freepascal/Lazarus. I know there are some other AGI's out there, but I wanted to add some more functionality than what is available such as having the AGI determine if the "data" argument is plain text or a path to a text file and act accordingly. The
2001 Oct 02
0
An example (was RE: file connection, while, readLines and bro wser)
Prof. Gentleman (and R-help), Here's an example of what didn't work. I still don't understand why. Function: trycon <- function(file, n) { f.con <- file(file, open="rt") on.exit(close(f.con)) i <- 0 while( length(readln <- readLines(f.con, 1)) > 0 ) { x <- unlist(strsplit(readln, " ")) if(length(x) <= 6 && x[3] ==
2001 Oct 02
0
file connection, while, readLines and browser
Dear R-help, I have one more question about the functions mentioned in the subject. Again, the system info is: platform i386-pc-mingw32 arch x86 os Win32 (OK, it's NT4sp6) system x86, Win32 status major 1 minor 3.1 year 2001 month 08 day 31 language R
2009 Nov 09
3
How to transform the Matrix into the way I want it ???
Hi, R users, I'm trying to transform a matrix A into B (see below). Anyone knows how to do it in R? Thanks. Matrix A (zone to zone travel time) zone z1 z2 z3 z1 0 2.9 4.3 z2 2.9 0 2.5 z3 4.3 2.5 0 B: from to time z1 z1 0 z1 z2 2.9 z1 z3 4.3 z2 z1 2.9 z2 z2 0 z2 z3 2.5 z3 z1 4.3 z3 z2 2.5 z3 z3 0 The real matrix I have is much larger, with more than 2000 zones. But I think it should
2010 Dec 17
3
box-and-whisker plots based on summary not data
Hi, Is it possible to produce box-and-whisker plots given that I have the median, interquartile and 5/95th centile values, but not the data from which they come? It seems that it ought to be possible to coerce bxp to do what I want, but I can't quite see how. Thanks, Matthew -- Matthew Vernon, Research Fellow Ecology and Epidemiology Group, University of Warwick
2007 Dec 14
2
Dual ISP
Attempting to setup a dual ISP on a gentoo box but I''m not sure how to configure the routing in the /etc/conf.d/net configuration file. Does shorewall do all the routing or do I set just the default route to the PRIMARY outbound ISP? Vernon ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net
2002 Feb 12
2
Rsync-2.5.2
New to the group! Which version is considered stable for redhat 7.2. I have attempted to compile 2.5.2 but recieve numerous compile warning. Once installed, I receive the following error but just keying rsync {return}. Please see the rsync(1) and rsyncd.conf(5) man pages for full documentation See http://rsync.samba.org/ for updates, bug reports, and answers rsync error: syntax or usage error
2007 Jan 25
1
SBS Backup User
Have a samba 3.0.22 joined ADS to a SBS windows 2003 R2. I am trying to get the SBS Backup to use a samba share. Username TPMMLAW\SBS Backup User is invalid on this system TPMMLAW is the domain. How would I map the "SBS Backup User" to a valid unix account. Any pointers? Vernon
2017 Jun 20
4
Updated Xen packages for XSA 216..225
FYI I will have an upload ready RSN. Where should I send it ? Matthew Vernon has offered to test my amd64 binaries. I will test the i386 packages myself. Ian.
2018 May 16
0
Bilateral matrix
Dear Bert and Huzefa, Apologies for the late reply, my account got hacked and I have just managed to recover it. Thank you very much for your replies and the solutions. Both work well. I was wondering if there was any way to ensure (force) that all possible combinations show up in the output. The full dataset has 25 cities but of course people have not moved from Boston to all the other 24
2010 Dec 23
1
Vioplot / list help
Hi, I have some data (lots of year,distance pairs), which I can straightforwardly boxplot: dists <- read.table("movedists.dat") with(dists,plot(as.factor(V1),V2)) If I want to plot these data as violin plots using vioplot, this approach doesn't work: > with(dists,vioplot(as.factor(V1),V2)) Error in Summary.factor(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, : min not
2015 May 21
8
Weak DH primes and openssh
Hi, You will be aware of https://weakdh.org/ by now, I presume; the take-home seems to be that 1024-bit DH primes might well be too weak. I'm wondering what (if anything!) you propose to do about this issue, and what Debian might do for our users? openssh already prefers ECDH, which must reduce the impact somewhat, although the main Windows client (PuTTY) doesn't support ECDH yet. But
2010 Jun 08
1
iterating over groups of columns
I am mainly a Java/C++ programmer, so my mind is used to iterating over data with for loops. After a long break, I am trying to get back into the "R mindset", but I could not find a solution in the documentation for the applys, aggregate, or by. I have a data.frame where each row is an entry with 10 groups of measurements. The first measurement spans 1 column, the second spans 2
2015 Mar 24
3
[Debian bug 781107] ssh-keygen -F return code has changed and is not documented
Hi, I tripped over the effects of commit 660854 [0] when moving some infrastructure from Debian 7 to 8 (openssh 6.0 to 6.7); our ansible module used "return 0, but no output" for 'host not found in known_hosts file', and now complains that ssh-keygen is returning an error status. I don't think this change in API was announced in the release notes? i.e. ssh-keygen -F
2018 May 08
3
Bilateral matrix
or in base R : ?xtabs ?? as in: xtabs(~previous_location + current_location,data=x) (You can convert the 0s to NA's if you like) Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, May 8, 2018 at 9:21 AM, Huzefa
2001 Sep 10
4
scp doesn't work with large (>2GB) files
Hi, A bug I've had reported is that scp doesn't work with large files (Debian bug number 106809). The problem seems to be scp.c:504: if ((fd = open(name, O_RDONLY, 0)) < 0) Is there some reason why making that if ((fd = open(name, O_RDONLY|O_LARGEFILE, 0)) < 0) would break things? It seems a simple fix to me... Thanks, Matthew -- "At least you know where you are
2003 Oct 26
4
Write Permissions
Hello all, Sorry for the terribly newbie questions but I have successfully installed and access a home directory on my Linux box from a Windows XP server but am have trouble with write permissions to the folder. Any ideas on what could be wrong? Thanks Vernon
2010 Dec 14
1
colour-plot of point intensities?
Hi, I've spent a while scrabbling around at this problem, to no avail. I'm sure there /should/ be a simple answer... I have a large (14 million rows) data set, with two columns. Each row contains the number of times an individual moved, and the distance that individual moved in total. I would like a figure where the colour indicates the density of points, rather like this one my