y = demand))+
geom_point(size = 5)
ggplot(data = BOD,
mapping = aes(x = Time,
y = demand))+
geom_point(size = 5)+
geom_abline()
ggplot(data = BOD,
mapping = aes(x = Time,
y = demand))+
geom_point(size = 5)+
geom_line(colour = "red")
###
ggplot(BOD, aes(Time, demand))
ggplot(BOD, aes(Time, demand))+
geom_point(size = 3)+
geom_line(colour = "red")
###
CO2
View(CO2)
?CO2
names(CO2)
names(CO2)
CO2 %>% #cntrl shift M
ggplot(aes(conc, uptake,
colour = Treatment))+
geom_point()
CO2 %>% #cntrl shift M
ggplot(aes(conc, uptake,
))+
geom_point(colour = Treatment)
ggplot(aes(conc, uptake,
colour = Treatment))+
geom_point()
ggplot(aes(conc, uptake,
colour = Treatment))+
geom_point()
CO2 %>% #cntrl shift M
ggplot(aes(conc, uptake,
colour = Treatment))+
geom_point()
CO2 %>% #cntrl shift M
ggplot(aes(conc, uptake,
colour = Treatment))+
geom_point(size = 3, alpha = 0.5)+
geom_smooth()
CO2 %>% #cntrl shift M
ggplot(aes(conc, uptake,
colour = Treatment))+
geom_point(size = 3, alpha = 0.5)+
geom_smooth(method = lm, se = F)
facet_wrap()
facet_wrap(~Type)
CO2 %>% #cntrl shift M
ggplot(aes(conc, uptake,
colour = Treatment))+
geom_point(size = 3, alpha = 0.5)+
geom_smooth(method = lm, se = F)
facet_wrap(~Type)
CO2 %>% #cntrl shift M
ggplot(aes(conc, uptake,
colour = Treatment))+
geom_point(size = 3, alpha = 0.5)+
geom_smooth(method = lm, se = F)+
facet_wrap(~Type)
CO2 %>% #cntrl shift M
ggplot(aes(conc, uptake,
colour = Treatment))+
geom_point(size = 3, alpha = 0.5)+
geom_smooth(method = lm, se = F)+
facet_wrap(~Type)+
labs(Title = "Concentration of C02")+
theme_bw()
CO2 %>%
ggplot(aes(Treatment, update))+
geom_boxplot()
View(CO2)
CO2 %>%
ggplot(aes(Treatment, uptake))+
geom_boxplot()
CO2 %>%
ggplot(aes(Treatment, uptake))+
geom_boxplot()+
geom_point()
CO2 %>%
ggplot(aes(Treatment, uptake))+
geom_boxplot()+
geom_point(aes(size = conc,
colour = Plant))
CO2 %>%
ggplot(aes(Treatment, uptake, size = conc,
colour = Plant))+
geom_boxplot()+
#  geom_point(aes(size = conc,
colour = Plant))
CO2 %>%
ggplot(aes(Treatment, uptake, size = conc,
colour = Plant))+
geom_boxplot()+
#  geom_point(aes(size = conc,
#                 colour = Plant))
CO2 %>%
ggplot(aes(Treatment, uptake, size = conc,
colour = Plant))+
geom_boxplot()
CO2 %>%
ggplot(aes(Treatment, uptake))+
geom_boxplot()
geom_point(aes(size = conc,
colour = Plant))
CO2 %>%
ggplot(aes(Treatment, uptake))+
geom_boxplot()+
geom_point(aes(size = conc,
colour = Plant))
CO2 %>%
ggplot(aes(Treatment, uptake))+
geom_boxplot()+
geom_point(alpha = 0.5,
aes(size = conc,
colour = Plant))
CO2 %>%
ggplot(aes(Treatment, uptake))+
geom_boxplot()+
geom_point(alpha = 0.5,
aes(size = conc,
colour = Plant))
coord_flip()
coord_flip()+
theme_bw()
CO2 %>% #cntrl shift M
ggplot(aes(conc, uptake,
colour = Treatment))+
geom_point(size = 3, alpha = 0.5)+
geom_smooth(method = lm, se = F)+
facet_wrap(~Type)+
labs(Title = "Concentration of C02")+
theme_bw()
CO2 %>%
ggplot(aes(Treatment, uptake))+
geom_boxplot()+
geom_point(alpha = 0.5,
aes(size = conc,
colour = Plant))
coord_flip()+
theme_bw()
CO2 %>%
ggplot(aes(Treatment, uptake))+
geom_boxplot()+
geom_point(alpha = 0.5,
aes(size = conc,
colour = Plant))+
facet(~Type)+
coord_flip()+
theme_bw()
CO2 %>%
ggplot(aes(Treatment, uptake))+
geom_boxplot()+
geom_point(alpha = 0.5,
aes(size = conc,
colour = Plant))+
facet_wrap(~Type)+
coord_flip()+
theme_bw()
mpg
view(mpg)
mpg %>%
ggplot(aes(displ, cty))+
geom_point()
mpg %>%
ggplot(aes(displ, cty))+
geom_point(colour = drv,
size = trans))
mpg %>%
ggplot(aes(displ, cty))+
geom_point(aes(colour = drv,
size = trans))
mpg %>%
ggplot(aes(displ, cty))+
geom_point(aes(colour = drv,
size = trans),
alpha = 0.5)
size = trans, alpha = 0.5)
mpg %>%
ggplot(aes(displ, cty))+
geom_point(aes(colour = drv,
size = trans, alpha = 0.5))
mpg %>%
ggplot(aes(displ, cty))+
geom_point(aes(colour = drv,
size = trans),
alpha = 0.5)
mpg %>%
ggplot(aes(displ, cty))+
geom_point(aes(colour = drv,
size = trans),
alpha = 0.5)+
geom_smooth(method = lm)
mpg %>%
ggplot(aes(displ, cty))+
geom_point(aes(colour = drv,
size = trans),
alpha = 0.5)+
geom_smooth(method = lm)+
facet_wrap(~year, nrow = 1)
mpg %>%
ggplot(aes(displ, cty))+
geom_point(aes(colour = drv,
size = trans),
alpha = 0.5)+
geom_smooth(method = lm)+
facet_wrap(~year)
mpg %>%
ggplot(aes(displ, cty))+
geom_point(aes(colour = drv,
size = trans),
alpha = 0.5)+
geom_smooth(method = lm)+
facet_wrap(~year, nrow = 1)
mpg %>%
filter(cty < 25) %>%
ggplot(aes(displ, cty))+
geom_point(aes(colour = drv,
size = trans),
alpha = 0.5)+
geom_smooth(method = lm)+
facet_wrap(~year, nrow = 1)
> library(limma)
library(readxl)
control <- read_excel("C:/Users/gcagn/Desktop/dates/2025May/KateMcKeever/TPP-Paper2/TPPScript-Paper2/TPP-Paper2-Analysis03/fuzzytest/control/control.xlsx")
View(control)
## control (no crowding agents) data from Crowding TPP experiment
data(control)
## fuzzy k-means with entropy regularization and noise cluster, fixing the number of clusters
clust=FKM.ent.noise(control,k = 18, RS=5,delta=3)
install.packages("fclust")
load(fclust)
library(fclust)
setwd("C:/Users/gcagn/Desktop/dates/2025May/KateMcKeever/TPP-Paper2/TPPScript-Paper2/TPP-Paper2-Analysis03/fuzzytest/control")
## control (no crowding agents) data from Crowding TPP experiment
data(control)
## fuzzy k-means with entropy regularization and noise cluster, fixing the number of clusters
clust=FKM.ent.noise(control,k = 18, RS=5,delta=3)
## fuzzy k-means with entropy regularization and noise cluster, selecting the number of clusters
clust=FKM.ent.noise(butterfly,RS=5,delta=3)
library(fclust)
## control (no crowding agents) data from Crowding TPP experiment
data(control)
## fuzzy k-means with entropy regularization and noise cluster, fixing the number of clusters
clust=FKM.ent.noise(control,k = 18, RS=5,delta=3)
## fuzzy k-means with entropy regularization and noise cluster, selecting the number of clusters
clust=FKM.ent.noise(control,RS=5,delta=3)
library(fclust)
## control (no crowding agents) data from Crowding TPP experiment
data(control)
## fuzzy k-means with entropy regularization and noise cluster, fixing the number of clusters
clust=FKM.ent.noise(control,k = 18, RS=5,delta=3)
## fuzzy k-means with entropy regularization and noise cluster, selecting the number of clusters
clust=FKM.ent.noise(control,RS=5,delta=3)
View(control)
## control (no crowding agents) data from Crowding TPP experiment
load(control)
library(fclust)
## control (no crowding agents) data from Crowding TPP experiment
load(control)
## control (no crowding agents) data from Crowding TPP experiment
# Load the fclust package
library(fclust)
# Load the control dataset
data(control)
# Perform fuzzy k-means with entropy regularization and noise cluster, fixing the number of clusters
clust_fixed <- FKM.ent.noise(control, k = 18, RS = 5, delta = 3)
# Perform fuzzy k-means with entropy regularization and noise cluster, selecting the number of clusters
clust_selected <- FKM.ent.noise(control, RS = 5, delta = 3)
# Print the results
print(clust_fixed)
print(clust_selected)
## control (no crowding agents) data from Crowding TPP experiment
# Load the fclust package
library(fclust)
# Load the control dataset
data(control)
# Perform fuzzy k-means with entropy regularization and noise cluster, fixing the number of clusters
clust_fixed <- FKM.ent.noise(control, k = 18, RS = 5, delta = 3)
# Perform fuzzy k-means with entropy regularization and noise cluster, selecting the number of clusters
clust_selected <- FKM.ent.noise(control, RS = 5, delta = 3)
# Print the results
print(clust_fixed)
print(clust_selected)
write.table(clust_fixed, file = “clust_fixed.txt”, sep = “”)
## control (no crowding agents) data from Crowding TPP experiment
# Load the fclust package
library(fclust)
# Load the control dataset
data(control)
# Perform fuzzy k-means with entropy regularization and noise cluster, fixing the number of clusters
clust_fixed <- FKM.ent.noise(control, k = 18, RS = 5, delta = 3)
# Perform fuzzy k-means with entropy regularization and noise cluster, selecting the number of clusters
clust_selected <- FKM.ent.noise(control, RS = 5, delta = 3)
# Print the results
print(clust_fixed)
print(clust_selected)
write.table(clust_fixed, file = “clust_fixed.txt")
## control (no crowding agents) data from Crowding TPP experiment
# Load the fclust package
library(fclust)
# Load the control dataset
data(control)
# Perform fuzzy k-means with entropy regularization and noise cluster, fixing the number of clusters
clust_fixed <- FKM.ent.noise(control, k = 18, RS = 5, delta = 3)
# Perform fuzzy k-means with entropy regularization and noise cluster, selecting the number of clusters
clust_selected <- FKM.ent.noise(control, RS = 5, delta = 3)
# Print the results
print(clust_fixed)
print(clust_selected)
write.table(clust_fixed, file = "clust_fixed.txt")
## control (no crowding agents) data from Crowding TPP experiment
# Load the fclust package
library(fclust)
# Load the control dataset
data(control)
# Perform fuzzy k-means with entropy regularization and noise cluster, fixing the number of clusters
clust_fixed <- FKM.ent.noise(control, k = 18, RS = 5, delta = 3)
# Perform fuzzy k-means with entropy regularization and noise cluster, selecting the number of clusters
clust_selected <- FKM.ent.noise(control, RS = 5, delta = 3)
#code suggested by ai
# Extract the cluster assignments from the fclust object
cluster_assignments_fixed <- clust_fixed@cluster
## control (no crowding agents) data from Crowding TPP experiment
# Load the fclust package
library(fclust)
# Load the control dataset
data(control)
# Perform fuzzy k-means with entropy regularization and noise cluster, fixing the number of clusters
clust_fixed <- FKM.ent.noise(control, k = 18, RS = 5, delta = 3)
# Perform fuzzy k-means with entropy regularization and noise cluster, selecting the number of clusters
clust_selected <- FKM.ent.noise(control, RS = 5, delta = 3)
# Write the cluster assignments to a text file
write.table(cluster_assignments_fixed, file = "clust_fixed.txt", row.names = FALSE, col.names = FALSE)
## control (no crowding agents) data from Crowding TPP experiment
# Load the fclust package
library(fclust)
# Load the control dataset
data(control)
# Perform fuzzy k-means with entropy regularization and noise cluster, fixing the number of clusters
clust_fixed <- FKM.ent.noise(control, k = 18, RS = 5, delta = 3)
# Perform fuzzy k-means with entropy regularization and noise cluster, selecting the number of clusters
clust_selected <- FKM.ent.noise(control, RS = 5, delta = 3)
# Print the results
print(clust_fixed)
print(clust_selected)
setwd("C:/Users/gcagn/Desktop/dates/2025May/KateMcKeever/TPP-Paper2/TPPScript-Paper2/TPP-Paper2-Analysis03/fuzzytest/control")
setwd("C:/Users/gcagn/Desktop/dates/2025May/KateMcKeever/TPP-Paper2/TPPScript-Paper2/TPP-Paper2-Analysis03/fuzzytest/control")
# Install and load the fclust package
if (!requireNamespace("fclust", quietly = TRUE)) {
install.packages("fclust")
}
library(fclust)
# Read the input file
# Assuming the input file is a CSV file, adjust the read function as needed
input_file <- "C:\Users\gcagn\Desktop\dates\2025May\KateMcKeever\TPP-Paper2\TPPScript-Paper2\TPP-Paper2-Analysis03\fuzzytest\controlc.csv"
setwd("C:/Users/gcagn/Desktop/dates/2025May/KateMcKeever/TPP-Paper2/TPPScript-Paper2/TPP-Paper2-Analysis03/fuzzytest/control")
setwd("C:/Users/gcagn/Desktop/dates/2025May/KateMcKeever/TPP-Paper2/TPPScript-Paper2/TPP-Paper2-Analysis03/fuzzytest/control")
getwd()
# Load necessary libraries
library(fclust)
# Read the comma-delimited dataset
# Replace 'your_file.csv' with the path to your actual file
#data <- read.csv('your_file.csv', header = TRUE, row.names = 1)
data <- read.csv('C:\Users\gcagn\Desktop\dates\2025May\KateMcKeever\TPP-Paper2\TPPScript-Paper2\TPP-Paper2-Analysis03\fuzzytest\controlccc.csv', header = TRUE, row.names = 1)
# Load necessary libraries
library(fclust)
# Read the comma-delimited dataset
# Replace 'your_file.csv' with the path to your actual file
#data <- read.csv('your_file.csv', header = TRUE, row.names = 1)
data <- read.csv('C:/Users/gcagn/Desktop/dates/2025May/KateMcKeever/TPP-Paper2/TPPScript-Paper2/TPP-Paper2-Analysis03/fuzzytest/controlccc.csv', header = TRUE, row.names = 1)
controlc <- read.csv("C:/Users/gcagn/Desktop/dates/2025May/KateMcKeever/TPP-Paper2/TPPScript-Paper2/TPP-Paper2-Analysis03/fuzzytest/control/controlc.csv", header=FALSE)
View(controlc)
setwd("C:/Users/gcagn/Desktop/dates/2025May/KateMcKeever/TPP-Paper2/TPPScript-Paper2/TPP-Paper2-Analysis03/fuzzytest/control")
# Load necessary libraries
library(fclust)
# Read the dataset from the working directory
Fuzzy4 <- read.csv('controlc', header = TRUE, skip = 3)
setwd("C:/Users/gcagn/Desktop/dates/2025May/KateMcKeever/TPP-Paper2/TPPScript-Paper2/TPP-Paper2-Analysis03/fuzzytest/control")
View(controlc)
list.files()
View(controlc)
View(controlc)
View(controlc)
View(controlc)
# Load necessary libraries
library(fclust)
# Read the dataset from the working directory
Fuzzy4 <- read.csv('controlc.csv', header = TRUE, skip = 3)
# Remove the gene_name column as it's not needed for clustering
data_for_clustering <- Fuzzy4[, -1]
# Perform fuzzy clustering
# You can adjust the parameters as needed
fuzzy_result <- fanny(data_for_clustering, k = 9, memb.exp = 2)
setwd("C:/Users/gcagn/Desktop/dates/2025May/KateMcKeever/TPP-Paper2/TPPScript-Paper2/TPP-Paper2-Analysis03/fuzzytest/control2")
# Load necessary libraries
library(fclust)
# Read the dataset from the working directory
Fuzzy4 <- read.csv('fuzzy2.csv', header = TRUE, skip = 3)
# Remove the gene_name column as it's not needed for clustering
data_for_clustering <- Fuzzy4[, -1]
# Perform fuzzy clustering using the fclust function
# You can adjust the parameters as needed
fuzzy_result <- fclust(data_for_clustering, k = 9, method = "fanny", control = list(memb.exp = 2))
install.packages(fclust)
install.packages("fclust")
setwd("C:/Users/gcagn/Desktop/dates/2025May/KateMcKeever/TPP-Paper2/TPPScript-Paper2/TPP-Paper2-Analysis03/fuzzytest/control")
setwd("C:/Users/gcagn/Desktop/dates/2025May/KateMcKeever/TPP-Paper2/TPPScript-Paper2/TPP-Paper2-Analysis03/fuzzytest/control2")
# Load necessary libraries
library(fclust)
# Read the dataset from the working directory
Fuzzy4 <- read.csv('fuzzy2.csv', header = TRUE, skip = 3)
# Remove the gene_name column as it's not needed for clustering
data_for_clustering <- Fuzzy4[, -1]
# Perform fuzzy clustering using the fclust function
# You can adjust the parameters as needed
fuzzy_result <- fclust(data_for_clustering, k = 9, method = "fanny", control = list(memb.exp = 2))
library(fclust)
# Read the dataset from the working directory
Fuzzy4 <- read.csv('fuzzy2.csv', header = TRUE, skip = 3)
# Remove the gene_name column as it's not needed for clustering
data_for_clustering <- Fuzzy4[, -1]
# Perform fuzzy clustering using the fclust function
# You can adjust the parameters as needed
fuzzy_result <- fclust(data_for_clustering, k = 9, method = "fanny", control = list(memb.exp = 2))
View(data_for_clustering)
View(Fuzzy4)
# Install the fclust package if not already installed
if (!requireNamespace("fclust", quietly = TRUE)) {
install.packages("fclust")
}
# Load the fclust package
library(fclust)
# Read the dataset from the working directory
Fuzzy4 <- read.csv('controlc', header = TRUE, skip = 3)
setwd("C:/Users/gcagn/Desktop/dates/2025May/KateMcKeever/TPP-Paper2/TPPScript-Paper2/TPP-Paper2-Analysis03/fuzzytest/control")
setwd("C:/Users/gcagn/Desktop/dates/2025May/KateMcKeever/TPP-Paper2/TPPScript-Paper2/TPP-Paper2-Analysis03/fuzzytest/control2")
setwd("C:/Users/gcagn/Desktop/dates/2025May/KateMcKeever/TPP-Paper2/TPPScript-Paper2/TPP-Paper2-Analysis03/fuzzytest/control2")
# Install the fclust package if not already installed
if (!requireNamespace("fclust", quietly = TRUE)) {
install.packages("fclust")
}
# Load the fclust package
library(fclust)
# Read the dataset from the working directory
Fuzzy4 <- read.csv('controlc', header = TRUE, skip = 3)
# Install the fclust package if not already installed
if (!requireNamespace("fclust", quietly = TRUE)) {
install.packages("fclust")
}
# Load the fclust package
library(fclust)
# Read the dataset from the working directory
Fuzzy4 <- read.csv('controlc.csv', header = TRUE, skip = 3)
# Install the fclust package if not already installed
if (!requireNamespace("fclust", quietly = TRUE)) {
install.packages("fclust")
}
# Load the fclust package
library(fclust)
# Read the dataset from the working directory
Fuzzy4 <- read.csv('fuzzy2.csv', header = TRUE, skip = 3)
# Remove the gene_name column as it's not needed for clustering
data_for_clustering <- Fuzzy4[, -1]
# Perform fuzzy clustering using the fclust function
# You can adjust the parameters as needed
fuzzy_result <- fclust(data_for_clustering, k = 9, method = "fanny", control = list(memb.exp = 2))
setwd("C:/Users/gcagn/Desktop/dates/2025May/KateMcKeever/TPP-Paper2/TPPScript-Paper2/TPP-Paper2-Analysis03/fuzzytest/control2")
# Install the fclust package if not already installed
if (!requireNamespace("fclust", quietly = TRUE)) {
install.packages("fclust")
}
# Load the fclust package
library(fclust)
# Read the dataset from the working directory
Fuzzy4 <- read.csv('fuzzy2.csv', header = TRUE, skip = 3)
# Remove the gene_name column as it's not needed for clustering
data_for_clustering <- Fuzzy4[, -1]
# Perform fuzzy clustering using the fclust function
# You can adjust the parameters as needed
fuzzy_result <- fclust(data_for_clustering, k = 9, method = "fanny", control = list(memb.exp = 2))
# Load the fclust package
library(fclust)
# Read the dataset from the working directory
Fuzzy4 <- read.csv('fuzzy2.csv', header = TRUE, skip = 3)
# Remove the gene_name column as it's not needed for clustering
data_for_clustering <- Fuzzy4[, -1]
# Perform fuzzy clustering using the fanny function
# You can adjust the parameters as needed
fuzzy_result <- fanny(data_for_clustering, k = 9, memb.exp = 2)
# Install the fclust package if not already installed
if (!requireNamespace("fclust", quietly = TRUE)) {
install.packages("fclust")
}
# Load the fclust package
library(fclust)
# Read the dataset from the working directory
Fuzzy4 <- read.csv('fuzzy2.csv', header = TRUE, skip = 3)
# Remove the gene_name column as it's not needed for clustering
data_for_clustering <- Fuzzy4[, -1]
# Perform fuzzy k-means clustering using the FKM.ent function
# You can adjust the parameters as needed
fuzzy_result <- FKM.ent(data_for_clustering, k = 9, m = 2)
# Print the fuzzy clustering result to a file
writeLines(capture.output(print(fuzzy_result)), con = "fuzzy_clustering_output.txt")
# Optionally, you can also save the fuzzy_result object for further analysis
saveRDS(fuzzy_result, file = "fuzzy_result.rds")
