1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
san4es73 [151]
3 years ago
13

Read the data file to a data frame ss16wa, and only retain columns "PWGTP", "AGEP", "WAGP", "VALP", "WKHP", "CIT", "ACCESS". (2)

Remove from ss16wa all rows with NA values. (3) Remove from ss16wa all rows where "PWGTP" is greater than 700. (4) Remove from ss16wa all rows where "AGEP" is greater than 87. (5) Remove from ss16wa all rows where "VALP" is less than 2000. (6) Print the dimensions of ss16wa. Hint: they should be 25820 by 7.
Computers and Technology
1 answer:
Murrr4er [49]3 years ago
4 0

Answer:

Data Frame

A data frame is used for storing data tables. It is a list of vectors of equal length. For example, the following variable df is a data frame containing three vectors n, s, b.

> n = c(2, 3, 5)

> s = c("aa", "bb", "cc")

> b = c(TRUE, FALSE, TRUE)

> df = data.frame(n, s, b)       # df is a data frame

Built-in Data Frame

We use built-in data frames in R for our tutorials. For example, here is a built-in data frame in R, called mtcars.

> mtcars

              mpg cyl disp  hp drat   wt ...

Mazda RX4     21.0   6  160 110 3.90 2.62 ...

Mazda RX4 Wag 21.0   6  160 110 3.90 2.88 ...

Datsun 710    22.8   4  108  93 3.85 2.32 ...

              ............

The top line of the table, called the header, contains the column names. Each horizontal line afterward denotes a data row, which begins with the name of the row, and then followed by the actual data. Each data member of a row is called a cell.

To retrieve data in a cell, we would enter its row and column coordinates in the single square bracket "[]" operator. The two coordinates are separated by a comma. In other words, the coordinates begins with row position, then followed by a comma, and ends with the column position. The order is important.

Explanation:

You might be interested in
(a) Store last 7 digits of your student ID in a vector (7 element row or column vector). Write a MATLAB code which creates a 7x7
astra-53 [7]

Answer:

MATLAB code explained below with appropriate comments for better understanding

Explanation:

clc

clear all

ID = [1 2 3 4 5 6 7]; % Replace this with your student ID

%(a)

A = zeros(7);

for i=1:7

 

A(i,i)= ID(i);

 

end

fprintf('A =\n');

disp(A);

B = diag(ID);

fprintf('B =\n');

disp(B);

fprintf('Both A and B are same\n');

%(b)

if(mod(A(6,6),2)==0)

fprintf('A(6,6) is even\n');

else

fprintf('A(6,6) is odd\n');

end

%(c)

if(A(3,3)>0)

fprintf('A(3,3) is positive\n');

else if(A(3,3)<0)

fprintf('A(3,3) is negative\n');

else

fprintf('A(3,3)=0\n');

end

end

%(d)

fprintf('\nRequired series : ');

n = 35;

while n>=0

fprintf('%i',n);

if(n>0)

fprintf(', ');

end

n = n - 5;

end

fprintf('\n');

%(e)

n = input('\nInput an integer : ');

fprintf('%i! = ',n);

F = 1;

while n>1

F = F * n;

n = n - 1;

end

fprintf('%i\n',F);

%(f)

clear all

x = [3 7 2 1];

y = [4 3 9 1];

A = 0;

C = x(1);

for i=1:length(x)

A = A + x(i)*y(i);

B(i) = x(i)/y(i);

if(min(x(i),y(i))<C)

C = min(x(i),y(i));

end

end

C = 1/C;

fprintf('\nA = %i\n',A);

fprintf('B = ');

disp(B)

fprintf('C = %0.5g\n',C);

%(g)

clear all

A = randi([5 25],[1,10]);

maxA = A(1);

for i = 2:10

if(maxA<A(i))

maxA = A(i);

end

end

minA = A(1);

i = 2;

while i<11

if(minA>A(i))

minA = A(i);

end

i = i+1;

end

fprintf('\nA = ');

disp(A);

fprintf('maxA = %i\n',maxA);

fprintf('minA = %i\n',minA);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%output

A =

1 0 0 0 0 0 0

0 2 0 0 0 0 0

0 0 3 0 0 0 0

0 0 0 4 0 0 0

0 0 0 0 5 0 0

0 0 0 0 0 6 0

0 0 0 0 0 0 7

B =

1 0 0 0 0 0 0

0 2 0 0 0 0 0

0 0 3 0 0 0 0

0 0 0 4 0 0 0

0 0 0 0 5 0 0

0 0 0 0 0 6 0

0 0 0 0 0 0 7

Both A and B are same

A(6,6) is even

A(3,3) is positive

Required series : 35, 30, 25, 20, 15, 10, 5, 0

Input an integer : 6

6! = 720

A = 52

B = 0.7500 2.3333 0.2222 1.0000

C = 1

A = 25 14 7 10 13 17 10 17 19 9

maxA = 25

minA = 7

>>

5 0
2 years ago
What are the benefits of using presentations to organize and deliver information?
bearhunter [10]
Hello.

The benefits of using presentations to organize and deliver information are: it keeps things in order, keeps peoples attention longer, and it looks more professional.
4 0
3 years ago
What is your understanding about the subject “digital image processing”?
N76 [4]

Answer:

Here's your answer mate.....☺️☺️

Explanation:

In computer science, digital image processing is the use of a digital computer to process digital images through an algorithm. ... It allows a much wider range of algorithms to be applied to the input data and can avoid problems such as the build-up of noise and distortion during processing.

<em><u>Hope it helps </u></em>☺️

5 0
3 years ago
5. A Telephone line is
Verizon [17]

Answer:

B

Explanation:

Hope this helps! Have a great day

6 0
2 years ago
Read 2 more answers
What is a deny all catch all
a_sh-v [17]

Answer: The default catch-all rules at the end of  are: block in log quick all label "Default block all just to be sure." block out log quick all label .

Explanation:

7 0
3 years ago
Other questions:
  • In the electric series, which one of the following materials is the most negatively charged? A. Silk B. Sealing wax C. Teflon D.
    7·2 answers
  • Discussion group may have a___________ who monitors the postings and enforces the sides rules​
    13·1 answer
  • What part of a file name does windows use to know which application to open to manage the file?
    13·2 answers
  • You are working on an excel table and realize that you need to add a row to the middle of your table. what is one way to do this
    12·1 answer
  • Which of the following components controls the opening and closing of the valves in an engine ?
    15·2 answers
  • ________ is a computer-based network that triggers actions by sensing changes in the real or digital world.
    15·2 answers
  • A Cisco Catalyst switch has been added to support the use of multiple VLANs as part of an enterprise network. The network techni
    5·1 answer
  • Who is your favorite person from squid game?
    13·2 answers
  • The field that uses technology to manipulate and use information to improve healthcare is known as:_______
    15·1 answer
  • Write l for law of enrtia,ll for law of Acceleration and lll for law of enteraction.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!