Displaying 2 results from an estimated 2 matches for "variable_1".
Did you mean:
variable1
2010 Dec 15
3
Applying function to a TABLE and also "apply, tapply, sapply etc"
Dear R-help forum members,
Suppose I have a data-frame having two variables and single data for each of them, as described below.
variable_1 variable_2
10 20
I have written a function, say, 'fun' which uses input 10 and 20 and gives me desired result.
fun = function(X, Y)
{
X + Y #( I am just giving an example of process. Actual process is
quite differe...
2011 Jun 02
1
Help in a project
...----------|------------------
1 | 10000 | NA
2 | NA | A
3 | 631 | NA
please note | represents another column.
this is for a large data set and I cannot manually go through this:
my attempt to this was :
l=0 # placeholder
m<-c() #newvariable 1
v<-c() #newvariable flag
for (z in tablename1$Variable_1)
(if (is.numeric(z) ) m[z:l] l=l+1 else v[z:1] l=l+1
Can you please guide me as to how to approach this problem?
Any help would be greatly appreciated.
Tarun Manchanda
[[alternative HTML version deleted]]