# Load libraries
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.4.2
library(plotly)
## 
## Adjuntando el paquete: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
# Create a data frame from the vector
df <- data.frame(x = c(1, 2, 3, 4), y = c(10, 20, 30, 40))

# Create a ggplot object
ph_test <- ggplot(df, aes(x = x, y = y)) +
  geom_point() + 
  ggtitle("Example Plot")

# Print the ggplot
print(ph_test)

# Convert to an interactive plot with plotly
ggplotly(ph_test)