Question

Write the logical expression to extract blood.glucose greater than 10 and short.velocity greater than 1.5 in...

Write the logical expression to extract blood.glucose greater than 10 and short.velocity
greater than 1.5 in the thuesen data set (Using R)

Homework Answers

Answer #1

ANSWER:

The code and output is given below:

> library(ISwR)
> data<-thuesen
> data
blood.glucose short.velocity
1 15.3 1.76
2 10.8 1.34
3 8.1 1.27
4 19.5 1.47
5 7.2 1.27
6 5.3 1.49
7 9.3 1.31
8 11.1 1.09
9 7.5 1.18
10 12.2 1.22
11 6.7 1.25
12 5.2 1.19
13 19.0 1.95
14 15.1 1.28
15 6.7 1.52
16 8.6 NA
17 4.2 1.12
18 10.3 1.37
19 12.5 1.19
20 16.1 1.05
21 13.3 1.32
22 4.9 1.03
23 8.8 1.12
24 9.5 1.70
>
> # Extract blood.glucose greater than 10
>
>
> data$blood.glucose[which(data$blood.glucose>10)]
[1] 15.3 10.8 19.5 11.1 12.2 19.0 15.1 10.3 12.5 16.1 13.3
>
> # Extract short.velocity greater than 10
>
> data$short.velocity[which(data$short.velocity>1.5)]
[1] 1.76 1.95 1.52 1.70

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write logical expressions for the following conditions: x is not a negative number x is a...
Write logical expressions for the following conditions: x is not a negative number x is a multiple of 7 x is greater than the sum of y and z x is the greatest number among x, y, and z x is less than 99 but greater than 49
1.Write an expression for the kinetic energy of the falling mass. The expression should be written...
1.Write an expression for the kinetic energy of the falling mass. The expression should be written in terms of the angular velocity ω and the radius R of the pulley where the string attaches. Write your expression in terms of variables, and write down the values of any numerical constants that enter the expression. 2.Write an expression for the kinetic energy of the rotating system. In this case the rotating system is mainly just the aluminum bar; you determined the...
f) If amount1 is greater than 10 and amount2 is less than 100, display the greater...
f) If amount1 is greater than 10 and amount2 is less than 100, display the greater of amount1 and amount2 . Flowchart Code Fragments (python source code, not Screenshot)
Use R to do each of the following. Use R code instructions that are as general...
Use R to do each of the following. Use R code instructions that are as general as possible, and also as efficient as possible. Use the Quick-R website for help on finding commands. 1. Enter the following values into a data vector named Dat: 45.4 44.2 36.8 35.1 39.0 60.0 47.4 41.1 45.8 35.6 2. Calculate the difference between the 2nd and 7th entries of this vector using only reference indices. 3. Calculate the median of Dat. 4. Sort the...
Write the canonical SOP expression for the function F(a, b, c, d)=∑m(2, 3, 9, 10, 11,...
Write the canonical SOP expression for the function F(a, b, c, d)=∑m(2, 3, 9, 10, 11, 13) and then simplify using algebraic manipulation.
Write the following as an inequality. 9 is greater than or equal to x, and 1...
Write the following as an inequality. 9 is greater than or equal to x, and 1 is less than or equal to  x Use x only once in your inequality.
A = [-1000:1:1000] write a script file that gives the positive numbers greater than 480 and...
A = [-1000:1:1000] write a script file that gives the positive numbers greater than 480 and divisible by 3. Hint: Use this command if A(i)>480&&(rem(A(i),3)==0) and indeed, if is always accompanied by an end Note: Using Matlab
Derive the expression for the electric field inside of a uniformly charged solid (non- conducting) sphere...
Derive the expression for the electric field inside of a uniformly charged solid (non- conducting) sphere of radius R using Gauss’ law. (b) Graph the electric field magnitude as a function of distance from the sphere center (include distances both less than and greater than the sphere’s radius); be sure to adequately label the graph.
When checking if weight loss is greater than 10 lbs per week for a particular population...
When checking if weight loss is greater than 10 lbs per week for a particular population of weight between 130 and 140 lbs- a random sample shows weight loss of 12, 15, 19, 2, 8, 14 and 9 lbs. If using the t-test to test if the average weight loss is greater than 10 lbs at 5% significance level, what is the p-value? You should use a one-sided test.
As long as the distance to the wall is much greater than the separation of the...
As long as the distance to the wall is much greater than the separation of the slits, the spacing between the bright spots is uniform. Using data from the Double Slit Experiment Data table, compute the distance between two bright spots. 3. How close together were you able to make your slits?  In other words, calculate the quantity d in the relation y = L/d .  Show all of your work. 4. If you were to use a green light instead of...