Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Part III (10 points) Consider the files l2b1.iva, l2b2.iva, and l2b3.iva from yo

ID: 3888958 • Letter: P

Question

Part III (10 points)

Consider the files l2b1.iva, l2b2.iva, and l2b3.iva from your lab2B. These are raw performance data collected on a solar photovoltaic module installed at ASU Polytechnic campus. These data must be processed to determine the performance output of the system or panel. The 3 files correspond to 3 repeated measurements.

Upon processing, the test data are presented as shown in the table below:

Performance Data

Curve Name

gge0001x

gge0001y

gge0001z

Date

12/30/2006

12/30/2006

12/30/2006

Time

14:15

14:15

14:16

Tamb (°C)

15.8

16.1

15.0

Tref (°C)

30.1

29.6

29.9

Tm (°C)

20.2

22.3

23.4

Irradiance (W/m^2)

1006.2

1003.5

999.8

Isc (A)

8.40

8.41

8.37

Voc (V)

37.14

36.82

36.62

Imp (A)

7.55

7.53

7.44

Vmp (V)

28.19

27.90

27.86

Pm (W)

212.86

210.15

207.15

FF (%)

68.3

67.9

67.6

In the table above, gge001x, gge001y, and gge001z are 3 repeated measurements on panel id gge001.

For this lab, we’ll use the techniques learned in this Unit to edit and format the data to obtain a single file that looks like below:

F gge0001x gge0001y gge0001z

D 12-30-2006 12-30-2006 12-30-2006

T 14:15:20 14:15:55 14:16:27

S a69 a69 a69

B 15.8 16.1 15

M gge06001 gge06001 gge06001

P 30.1 29.6 29.9

Q 20.2 22.3 23.4

R 1006.2 1003.5 999.8

U 1011.8 1011.8 1005

X 34.7 35.2 35.1

A 38.994 38.994 38.994

G 107.71 107.71 107.71

H 8.395 8.406 8.368

O 37.141 36.823 36.621

C 7.55 7.532 7.437

K 28.193 27.902 27.856

W 212.86 210.15 207.15

L 68.3 67.9 67.6

You’ll need to use the best possible ways (commands, pipelines, sequence) that result in an efficient processing (i.e. fewer keystrokes).

You will submit two files:

A file called lab3.3.sbs, created with vi, and explaining your step-by-step (including commands, pipelines, etc.) process to obtaining the resulting file

The processPart III (10 points)

Consider the files l2b1.iva, l2b2.iva, and l2b3.iva from your lab2B. These are raw performance data collected on a solar photovoltaic module installed at ASU Polytechnic campus. These data must be processed to determine the performance output of the system or panel. The 3 files correspond to 3 repeated measurements.

Upon processing, the test data are presented as shown in the table below:

Performance Data

Curve Name

gge0001x

gge0001y

gge0001z

Date

12/30/2006

12/30/2006

12/30/2006

Time

14:15

14:15

14:16

Tamb (°C)

15.8

16.1

15.0

Tref (°C)

30.1

29.6

29.9

Tm (°C)

20.2

22.3

23.4

Irradiance (W/m^2)

1006.2

1003.5

999.8

Isc (A)

8.40

8.41

8.37

Voc (V)

37.14

36.82

36.62

Imp (A)

7.55

7.53

7.44

Vmp (V)

28.19

27.90

27.86

Pm (W)

212.86

210.15

207.15

FF (%)

68.3

67.9

67.6

In the table above, gge001x, gge001y, and gge001z are 3 repeated measurements on panel id gge001.

For this lab, we’ll use the techniques learned in this Unit to edit and format the data to obtain a single file that looks like below:

F gge0001x gge0001y gge0001z

D 12-30-2006 12-30-2006 12-30-2006

T 14:15:20 14:15:55 14:16:27

S a69 a69 a69

B 15.8 16.1 15

M gge06001 gge06001 gge06001

P 30.1 29.6 29.9

Q 20.2 22.3 23.4

R 1006.2 1003.5 999.8

U 1011.8 1011.8 1005

X 34.7 35.2 35.1

A 38.994 38.994 38.994

G 107.71 107.71 107.71

H 8.395 8.406 8.368

O 37.141 36.823 36.621

C 7.55 7.532 7.437

K 28.193 27.902 27.856

W 212.86 210.15 207.15

L 68.3 67.9 67.6

You’ll need to use the best possible ways (commands, pipelines, sequence) that result in an efficient processing (i.e. fewer keystrokes).

You will submit two files:

A file called lab3.3.sbs, created with vi, and explaining your step-by-step (including commands, pipelines, etc.) process to obtaining the resulting file

The processed file, called lab3.3.prc

The grading criteria will be based on the efficient use of the concepts covered in this Unit.ed file, called lab3.3.prc

The grading criteria will be based on the efficient use of the concepts covered in this Unit.

Performance Data

Curve Name

gge0001x

gge0001y

gge0001z

Date

12/30/2006

12/30/2006

12/30/2006

Time

14:15

14:15

14:16

Tamb (°C)

15.8

16.1

15.0

Tref (°C)

30.1

29.6

29.9

Tm (°C)

20.2

22.3

23.4

Irradiance (W/m^2)

1006.2

1003.5

999.8

Isc (A)

8.40

8.41

8.37

Voc (V)

37.14

36.82

36.62

Imp (A)

7.55

7.53

7.44

Vmp (V)

28.19

27.90

27.86

Pm (W)

212.86

210.15

207.15

FF (%)

68.3

67.9

67.6

Explanation / Answer

Answer: Use the following command sequence in R. Assume given test file is stored as "data.txt".

---------------------------------------------

data<-read.csv("data.txt",skip=1,sep=" ",header=F,stringsAsFactors=F)
s<-c("S","a69","a69","a69")
m<-c("M","gge06001","gge06001","gge06001")
u<-c("U",1011.8,1011.8,1005)
x<-c("X",34.7,35.2,35.1)
a<-c("A",38.994,38.994,38.994)
g<-c("G",107.71,107.71,107.71)
new_data<-rbind(data[1:3,],s,data[4,],m,data[5:7,],u,x,a,g,data[8:13,])
new_data[2,2:4]<-strftime(as.Date(as.matrix(new_data[2,2:4]),"%m/%d/%Y"),"%m-%d-%Y")
new_data[,1]<-c("F","D","T","S","B","M","P","Q","R","U","X","A","G","H","O","C","K","W","L")
write.table(new_data,file="new_data.txt",sep=" ",row.names=FALSE,col.names=FALSE)

----------------------------------------------

Output:

---------------------------------------------

"F"   "gge0001x"   "gge0001y"   "gge0001z"
"D"   "12-30-2006"   "12-30-2006"   "12-30-2006"
"T"   "14:15"   "14:15"   "14:16"
"S"   "a69"   "a69"   "a69"
"B"   "15.8"   "16.1"   "15"
"M"   "gge06001"   "gge06001"   "gge06001"
"P"   "30.1"   "29.6"   "29.9"
"Q"   "20.2"   "22.3"   "23.4"
"R"   "1006.2"   "1003.5"   "999.8"
"U"   "1011.8"   "1011.8"   "1005"
"X"   "34.7"   "35.2"   "35.1"
"A"   "38.994"   "38.994"   "38.994"
"G"   "107.71"   "107.71"   "107.71"
"H"   "8.4"   "8.41"   "8.37"
"O"   "37.14"   "36.82"   "36.62"
"C"   "7.55"   "7.53"   "7.44"
"K"   "28.19"   "27.9"   "27.86"
"W"   "212.86"   "210.15"   "207.15"
"L"   "68.3"   "67.9"   "67.6"

-------------------------------------------------