similar to: Using loop numbers in write.csv

Displaying 13 results from an estimated 13 matches similar to: "Using loop numbers in write.csv"

2009 Jan 20
1
Creating a Sparse Matrix from a Sparse Vector
Hello, I am working with a sparse matrix that is approx. 13,900 by 14,100. My goal is to select a row out of the matrix and create a new matrix with that row repeated 13,900 times without having to do any looping. Example: Starting Matrix: exampleMatrix 3 x 4 sparse Matrix of class "dgCMatrix" [1,] 1 . . . [2,] . 1 . 0.5 [3,] . . 1 .. New Matrix:.. newExampleMatrix 3 x 4 sparse
2008 Nov 21
1
list creation interpolation
Hello all, I apologize if this is simple or has already been answered somewhere, but I'm not sure what to search for although I have tried and didn't come up with anything so.. Here's my question. How can I interpolate list names or do I have to do it post list creation. Since that's not very clear here is some sample code of what I wanted to do: >
2009 Feb 03
3
non linear regression with nls
Hello, I'm a beginner with R and it's the first time I'm using the R-help list... I hope I'm in the right place, if not: Sorry!! I need to do non linear regressions on a data set which columns are: "river.name" "Portata" "PTG.P" "PO4.P" "NT.N" "NH4.N" "NO3.N" "BOD5" "SiO2"
2009 Feb 10
3
summary of a list
Hello, I'm using the following for loop to find regression curves using a list of functions (formList), a list of starting values (startList), uppervalues (upperList) and lower values (lowerList). A sample of the list of function I use in the loop is the following: FormList <- list(PTG.P ~ fz1(Portata, a, b), PTG.P ~ fz2(Portata, a, b), PTG.P ~ fz3(Portata,a, b, d, e), PTG.P ~
2009 Feb 10
2
plotting the result of a nonlinear regression
Hello, to plot the result of a singular non linear regression (using nls) I usually use the function plotfit, for example: r.PTG.V<-nls(PTG.P~ fz1(Portata, a,b), data=dati, start=list(a=10, b=10), nls.control(maxiter=200), algorithm='port', trace=TRUE, na.action=na.omit, lower=list(a=0, b=10), upper=list(a=100, b=100)) plotfit(r.PTG.V) I tried to use the function plotfit on the
2009 Sep 18
1
lapply - value changes as parameters to function?
Hi, I'm trying to get better at things like lapply but it still stumps me. I have a function I've written, tested and debugged using individual calls to the function, ala: ResultList5 = DoAvgCalcs(IndexData, Lookback=5, SampleSize=TestSamples , Iterations=TestIterations ) ResultList8 = DoAvgCalcs(IndexData, Lookback=8, SampleSize=TestSamples , Iterations=TestIterations ) ResultList13
2007 Oct 11
3
radio_button_tag
Hello I have a view which have 2 radio buttons : ... <td style="width:5%">Actuel</td> <td style="width:10%"><%= radio_button_tag(:actuel, value = "1", checked = false, options = {}) %> <td style="width:5%">Last</td> <td style="width:10%"><%= radio_button_tag(:last, value = "1", checked =
2008 Jun 24
3
loop with files
I'm trying to make a loop with many files... > library(dplR) > > files <- system("ls *.rwl", intern=TRUE) > > files [1] "cimfasy.rwl" "rocquce.rwl" > for (i in files) {a <- read.rwl(i,header=0)} There are 70 series There are 21 series > class(a) [1] "data.frame" This loop import all the files rwl in a single data.frame ( a
2006 Mar 02
3
Custom SQL Question
Hello, can search with following SQL Statement: def execute_search @result = Search.find_by_sql ["SELECT * FROM customers WHERE firstname LIKE ? LIMIT 10",params[:firstname]] render :template => "search/resultlist", :layout => false end My question is, how do I use 2 or more Parameters - and with the "%"? (I Like to use SQL-Statements because
2010 Jun 03
1
cumsum function with data frame
Dear list, I have a problem with the cumsum function. I have a data frame like the following one variable Year value EC01 2005 5 EC01 2006 10 AAO1 2005 2 AAO1 2006 4 what I would like to obtain is variable Year value cumsum EC01 2005 5 5 EC01
2008 Oct 05
3
efficient use of lm over a matrix vs. using apply over rows
I have a large matrix, each row of which needs lm applied. I am certain than I read an article in R-news about this within the last year or two that discussed the application of lm to matrices but I'll be darned if I can find it with Google. Probably using the wrong search terms. Can someone steer me to this article of just tell me if this is possible and, if so, how to do it? My simplistic
2013 Nov 06
1
Multiple String word replacements: Performance Issue
Dear experts, I?ve been on this for weeks now, and couldn?t find a solution..Sorry for the long description. I figured I post many details, so you get the problem entirely, although it?s not hard to grasp. **Situation:** Data frame consisting of 4 million entries (total size: 250 MB). Two columns: `ID` and `TEXT`. Text strings are each up to 200 characters. **Task:** Preprocessing the text
2009 Feb 13
2
odfWeave & prettyR
Hello, I've been trying to use odfWeave and prettyR packages to create documents with both text and graphs, but so far I haven't been very lucky... With the function R2html () in prettyR package, when I try to use a source file, which works perfectly if I run it directly form R using "source("file")", it works for the first part and then it makes a mess, i guess