@@ -19,7 +19,7 @@ missingdata <- aromatase[!complete.cases(aromatase), ] # Identify which row cont
19
19
aromatase <- na.omit(aromatase ) # Remove any missing data >> Complete case
20
20
sum(is.na(aromatase )) # Check again for missing data
21
21
22
- class <- aromatase [,2 ] # Class label
22
+ class <- aromatase [ ,2 ] # Class label
23
23
aromatase2 <- aromatase [,6 : 18 ] # Descriptors
24
24
aromatase3 <- cbind(class , aromatase2 ) # Combine Class label + Descriptors into same dataframe
25
25
@@ -65,7 +65,7 @@ plot(df$MW, df$ALogP, col = "#FF0000") # Hex color code for red
65
65
rgb(1 ,0 ,0 ) # red color
66
66
rgb(255 ,0 ,0 , max = 255 ) # red color
67
67
68
- plot(df $ MW , df $ ALogP , col = rgb(255 ,0 ,0 , max = 255 ) )
68
+ plot(df $ MW , df $ ALogP , col = rgb(0 ,0 ,0 , max = 255 ) )
69
69
70
70
71
71
@@ -104,8 +104,8 @@ plot(df$MW, df$ALogP, pch = 16, col=alpha(as.character(df$color),0.3 ) )
104
104
# Scatter plot of first pair
105
105
plot(df $ MW , df $ ALogP , pch = 16 ,
106
106
col = alpha(" red" , 0.3 ),
107
- xlab = " MW " , # X-axis label
108
- ylab = " ALogP" , # Y-axis label
107
+ xlab = " Molecular Weight (MW) " , # X-axis label
108
+ ylab = " Solubility ( ALogP) " , # Y-axis label
109
109
font.lab = 2 # X and Y labels are now bold
110
110
)
111
111
abline(lm(df $ ALogP ~ df $ MW )) # Trend line
@@ -197,7 +197,11 @@ abline(lm(df$HOMO ~ df$MW)) # Trend line
197
197
pdf(" plot.pdf" )
198
198
# ...Insert plot function here...
199
199
dev.off()
200
-
200
+
201
+ pdf(" plot.pdf" )
202
+ plot(df $ ALogP , df $ MW )
203
+ dev.off()
204
+
201
205
# Multi-plot
202
206
203
207
pdf(" plot2.pdf" )
@@ -208,6 +212,12 @@ abline(lm(df$HOMO ~ df$MW)) # Trend line
208
212
# Plot 4
209
213
dev.off()
210
214
215
+ pdf(" plot_multiplot.pdf" )
216
+ par(mfrow = c(1 ,3 ), mai = c(0.3 , 0.3 , 0.3 , 0 ))
217
+ plot(df $ ALogP , df $ MW ) # Plot 1
218
+ plot(df $ Qm , df $ MW ) # Plot 2
219
+ plot(df $ HOMO , df $ MW ) # Plot 4
220
+ dev.off()
211
221
212
222
pdf(" plot2.pdf" )
213
223
par(mfrow = c(2 ,2 ), mai = c(0.7 , 0.7 , 0.3 , 0.3 ))
0 commit comments