[R] lapply, strsplit, and list elements

2011-02-04 Thread Dick Harray
Hi there, I have a problem about lapply, strsplit, and accessing list elements, which I don't understand or cannot solve: I have e.g. a character vector with three elements: x = c("349/077,349/074,349/100,349/117", "340/384.2,340/513,367/139,455/128,D13/168", "600/437,128/903,1

[R] User defined function and nonlinear least-squares fit

2010-11-04 Thread Dick Harray
Hello, I'd like to fit a user defined function to a data set, but I have problems to find my problem. The user defined function is a combination of two rectangular functions, and the listing below gives an example for what I want to do. The problem is, that I get the error message for fit1 and fit

[R] read and process files line by line

2010-02-06 Thread Dick Harray
Hi there, I want to read large files line by line in order to process each line and store the information of each list iin an object. My problem is, that I do not know how to process each line of the file, because I want to avoid to import the whole file. The data file "inputdata.csv" is a CSV fi