Displaying 4 results from an estimated 4 matches for "roop".
Did you mean:
loop
2018 Mar 21
3
Mean of a row of a data frame
I am trying to get the mean of a row of a data frame. My code follows:
roop <- data.frame(x=c(1,2,3),y=c(4,5,2),z=c(0,9,4))
roop
mean(roop[1,])
mean(roop[1,c("x","y","z")])
I get the following output:
> roop
x y z
1 1 4 0
2 2 5 9
3 3 2 4
> mean(roop[1,])
[1] NA
Warning message:
In mean.default(roop[1, ]) :
argument is not numer...
2018 Mar 21
0
Mean of a row of a data frame
R > rowMeans(roop)
[1] 1.666667 5.333333 3.000000
R > mean(as.numeric(roop[1,]))
[1] 1.666667
:-)
> On Mar 20, 2018, at 10:18 PM, Sorkin, John <jsorkin at som.umaryland.edu> wrote:
>
> I am trying to get the mean of a row of a data frame. My code follows:
>
>
> roop <- data.fra...
2006 Apr 13
3
QueryParser doesn''t use StandardAnalyzer correctly?
...#39;'contents'', :analyzer =>
Ferret::Analysis::StandardAnalyzer.new, :occur_default =>
Ferret::Search::BooleanClause::Occur::MUST)
q1 = parser.parse(''museum art'')
q2 = parser.parse(''museum of art'')
puts q1, q2
Thanks for any insight.
-Roop
--
Posted via http://www.ruby-forum.com/.
2006 Apr 11
2
setting the default operator on a QueryParser
...ault OR.
In Java I would simply do:
QueryParser parser = new QueryParser("contents", new
StandardAnalyzer());
parser.setDefaultOperator(QueryParser.Operator.AND);
But I can''t find the corresponding method in the Ferret API. Have I
missed it or is there a workaround?
Thanks,
Roop
--
Posted via http://www.ruby-forum.com/.