similar to: How to manipulate the pointer of a file?

Displaying 20 results from an estimated 20000 matches similar to: "How to manipulate the pointer of a file?"

2007 Jun 23
3
Setting up a blank table with column names in the hard drive
Dear Friends. Greetings! This should be a very common operation and I believe there should be a nice way in R to handle it. I couldn't find it in the manual or by searching on line. I am wondering if I could ask for some help in this community. I am trying to record the results of my program to a csv file in the hard drive so as to save memory space and also to read the results in excel
2007 Aug 29
4
How to signal the end of the table?
I am using a "for" loop to read a table row by row and I have to specify how many records are there in the table. I need to read row by row because the table is huge and the memory not large enough for the whole table.: number.of.records=100 fp=file("abc.csv","r") pos=seek(fp, rw="read") for (i in 1:number.of.record){ current.row=scan(file=fp,
2007 Aug 13
2
How to write to a table column by column?
Dear friends. Every loop of my program will result in a list that is very long, with a structure similar to the one below: Lst <- list(name="Fred", wife="Mary", daily.incomes=c(1:850)) Please notice the large size of "daily.incomes". I need to store all such lists in a csv file so that I can easily view them in Excel. Excel cannot display a row of more than 300
2007 Apr 06
2
Reading a csv file row by row
Hi, my friends. When a data file is large, loading the whole file into the memory all together is not feasible. A feasible way is to read one row, process it, store the result, and read the next row. In Fortran, by default, the 'read' command reads one line of a file, which is convenient, and when the same 'read' command is executed the next time, the next row of the same file
2007 Apr 15
1
nls.control( ) has no influence on nls( ) !
Dear Friends. I tried to use nls.control() to change the 'minFactor' in nls( ), but it does not seem to work. I used nls( ) function and encountered error message "step factor 0.000488281 reduced below 'minFactor' of 0.000976563". I then tried the following: 1) Put "nls.control(minFactor = 1/(4096*128))" inside the brackets of nls, but the same error message
2007 Aug 10
0
set up a blank csv file and write time series to it row by row
Dear Friends. Greetings! I have asked the question of how to set up a blank file and write a list to it as a row for many times, with the number of lists unknown. I have received many beautiful solutions. Thanks go to Professor *Murdoch, Professor *Menne, Professor Grothendieck and Dr. Olshansky. I have organized the solutions below: ########################################## *Set up a
2007 Aug 03
2
Saving an expression to a file
Dear Friends. I have a very long expression and I use function D to find its derivative, which will be even longer. I save the resulting expression in a variavle, say bbb. But when I tried to display bbb on the screen, the R screen is not long enough for me to view it. Is there a way to save the expression to a file? Best Wishes Yuchen Luo [[alternative HTML version deleted]]
2007 Jun 21
4
"if" within a function
Dear Friends. I found a puzzling phenomenon in R when you use 'if' within a function: # defining a function aaa aaa=function(a) {if (a==1) {aaa=1}; if (a!=1) {aaa=2} } # using the function: > b=20 > bbb=aaa(b) > bbb [1] 2 > typeof(bbb) [1] "double" > > > c=1 > ccc=aaa(c) > ccc NULL > typeof(ccc) [1] "NULL" It seems that only the last
2005 Jun 30
7
passing through MWI info from SBC
Hi.. I am about to replace my aging Nortel Venture system with an Asterisk system and 6 Polycom IP 501 phones, and a couple sipura 841's for less used areas. We have 3 phone lines here. One is SBC, one Vonage, and one Voipjet... One hangup is that I can't figure out how to pass through a voicemail waiting indication from SBC. This is important because my wife and her family all
2007 Aug 29
1
How to let the program know the end of a file is reached?
Dear collegues. I am using scan( ) to read from a table (a csv file). I am wondering how to let the program know that the end of the file is reached? Your help will be highly appreciated! Best Wishes Yuchen Luo [[alternative HTML version deleted]]
2007 Sep 07
1
'initial value not feasible' in constrOptim
Dear friends. I am using function constrOptim(c(0.5,0.3,0.5), fit.error, fit.error.grr, ui=-1*ui,ci=-1*ci) and I am confronted with error message "initial value not feasible" I plug in the initial value of (0.5,0.3,0.5) to function fit.error and fit.error.grr and have pretty reasonable result. I inequality "ui %*% theta - ci >= 0" as suggested in the R manual and it is
2007 Sep 05
3
'singular gradient matrix’ when using nls() and how to make the program skip nls( ) and run on
Dear friends. I use nls() and encounter the following puzzling problem: I have a function f(a,b,c,x), I have a data vector of x and a vectory y of realized value of f. Case1 I tried to estimate c with (a=0.3, b=0.5) fixed: nls(y~f(a,b,c,x), control=list(maxiter = 100000, minFactor=0.5 ^2048),start=list(c=0.5)). The error message is: "number of iterations exceeded maximum of
2007 Jul 15
1
Looping through a series of (csv) files
Dear Colleagues. This should be a very common operation and I believe there should be a nice way in R to handle it. I couldn't find it in the manual or by searching online. I am wondering if I could ask for some help in this community. I have 48 csv files; each stores the data for a specific month. The 48 corresponding months are consecutively from January, 2001 to December, 2004. I name
2007 Apr 06
1
Reading a large csv file row by row
Hi, my friends. When a data file is large, loading the whole file into the memory all together is not feasible. A feasible way is to read one row, process it, store the result, and read the next row. In Fortran, by default, the 'read' command reads one line of a file, which is convenient, and when the same 'read' command is executed the next time, the next row of the same file
2005 May 14
1
Help Please Multiple Users for Broadvoice
I would like to be able to have multiple users (the wife and kids) to be able to access the Broadvoice account at the same. No complaining that way from them :-). I seen someones configuration in the group here but now I can't find it (lost my glasses). If someone could post theirs's or the shortcut that would be great. Thanks for your help. "Dad she's on the phone
2008 Aug 10
2
Red Faction will not setup
I know, Red Faction probably wasn't the most exciting game made but I like it. I have one copy on my Windows machine that my wife and kids use and the other copy of Red Faction with Ubuntu 8.04 on my laptop. The game installed flawlessly and starts right up. It opens the main panel and will not start the game until I click on "Setup" and setup the video, sound and a few other
2004 Aug 06
1
Limiting stream bandwidth
I am trying to limit the bandwidth per stream so that I can stream 2 mp3 connections from my box. I have 256 upload speed. I am using icecast 0.3 and ices 2. I made the changed listed below, restarted everything but it still seems to be streaming at max bandwith. Is there anything, besides moving to ogg vorbis -- it will happen when I have time to write the script to convert the 1000s of files
2005 Jan 31
5
RE: Answering Machine Function?
-----Original Message----- <snip> Is this possible with asterisk? Anyone have a sample dialplan? -other than the problem outlined below I would try something like S,1,wait(20) S,2,voicemail(uwhatever) S,3,hangup That should ignore the call for 20 seconds and then leave a message in the unavailable greeting for 'whatever' then hangup That leaves another problem -
2005 Apr 18
7
Shorewall and IPv6
How is the effort to make Shorewall do iptables6 going? -- Patrick "Diablo-D3" McFarland || pmcfarland@downeast.net "Computer games don''t affect kids; I mean if Pac-Man affected us as kids, we''d all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." -- Kristian Wilson, Nintendo, Inc, 1989 --------------
2011 May 15
2
Unexpected behaviour as.data.frame
I use the following code to create two data.frames d1 and d2 from a list: types <- c("integer", "character", "double") nlines <- 10 d1 <- as.data.frame(lapply(types, do.call, list(nlines)), stringsAsFactor=FALSE) l2 <- lapply(types, do.call, list(nlines)) d2 <- as.data.frame(l2, stringsAsFactors=FALSE) I would expect d1 and d2 to be the