Displaying 4 results from an estimated 4 matches for "dre968".
2009 Apr 23
4
simple for loop question - how do you exit?
I have a loop and an if statement in the loop. once the if statement is true
for 1 value in the loop i'd like to exit the loop. is there a command to do
this? i know its going to be something like exit and i feel stupid asking
this question
--
View this message in context: http://www.nabble.com/simple-for-loop-question---how-do-you-exit--tp23197504p23197504.html
Sent from the R help
2009 Apr 23
6
Stuck using constrOptim
Trying to use constrOptim to minimize the sum of squared deviations. I put
the objective function in as: sum((x %*% Y - Z)^2) so i'm trying to get
values for x to minimize the sum of the squared deviations between the
product of x and Y and Z.
Anyways i have no problem using this when x is a 3x1 test variable. it
works great with the constraints and everything. when i actually use it on
2009 Apr 22
3
Help using spg optimization in BB package
i'm trying to use the BB package to minimize the sum of the squared
deviations for 2 vectors. The only thing am having trouble with is defining
the project constraint. I got the upper and lower bounds to work but i am
not sure how to create a constraint that the sum of x must be 1. Any help
would be greatly appreciated.
--
View this message in context:
2009 Apr 22
1
How do I loop through strings?
I read in a CSV file with Data <-
read.csv(file="FileName.csv",head=TRUE,sep=",")
the file containts strings in the 2nd and 3rd columns and each has about
1000 rows. I need to either loop through the strings there looking for
strings that would trigger other logic or remove those rows and put them in
another array and loop through them in the new array. I can't seem