Displaying 2 results from an estimated 2 matches for "field_a".
Did you mean:
field_r
2008 Jan 22
1
row-wise conditional update in dataframe
Hi!
I need to conditionally update a dataframe field based on values in
other fields and can't find even how to search for this right. Sorry
if this has been asked before.
But, specifically, I have a 490 X 221 dataframe and need to count, by
row, how many fields in Dataframe$field_a...Dataframe$field_zz are
non-null and enter this value in Dataset$ABCtaskNum. I have field
name definitions in a vector "vars" and tried writing a custom
function to handle the within-row calculation
myfunct <-function () {for (i in 1:length(vars)) {if (vars[i] != NA)
{Dataset...
2006 Apr 10
1
Add Column After Column in Migrations
Adding a column to a table just places the column at the end, but I
like to keep related columns together. Is there a way to specify
where the column is added in a table with migrations? For example, in
MySQL you can do:
ALTER TABLE my_table ADD COLUMN new_column INT AFTER other_column
I was hoping migrations would support something like this:
add_column :my_table, :new_column, :integer,