data <- read.table(practicedata.cvs)
# Calculate the mean, max, min, median, and sum of column "K5". If there is any NA, please ignore them.
# Draw any figure to describe column "K5".
# Print all rows with "Play" is 1, "K1" is 1, and "K5" is NA.
# Print the row of the first time in which sum of K1, K2, ..., K11 larger than 45.
# Print the last row you find that sum of K1, K2, ..., K11 is larger than 45.
As the language is not mentioned
Assuming matlab
as wrote as table
%Assuming T is table
rows = (T.k5 ~= 'NA');
k5 = T.k5(rows);
mean(k5)
max(k5)
min(k5)
median(k5)
sumk5 = sum(k5);
% use plot or boxplot
boxplot(k5)
%
rows = (T.k5 == 'NA') && (T.Play ==1) && (T.K1 ==1);
tablerows = T(rows,:);
%
tablesplit = T(:,{k1:k11});
summed = sum(tablesplit,2);
summed = [summed >45];
%iterate summed to find ur requirement
for i=1:len(summed)
if summed(i)
print(T(i,:))
for i =1:len(summed)
j = len(summed) + 1 -i;
if summed(j)
print(T(j,:))
Get Answers For Free
Most questions answered within 1 hours.