I am answering my own question, but I have found the solution at last. Quoting R help:
"Data sets are searched for in all the currently loaded packages, then in the ‘data’ directory (if any) of the current working directory."
Thus, all one has to do is write the dataset in a file and place it into a directory named "data" and located into the working directory.
> write.table(mydataset,file="dataset.csv",sep=",",quote=TRUE,row.names=FALSE) # I intend to create a csv file, so I use 'sep=","' to separate the entries by a comma, 'quote=TRUE' to quote all the entries, and 'row.names=F to prevent the creation of an extra column containing the row names (which is the default behavior of write.table() )
# Now place the dataset into a "data" directory (either via R or via the operating system, doesn't make any difference):
> dir.create("data") # create the directory
> file.rename(from="dataset.csv",to="data/dataset.csv") # move the file
# Now we can finally load the dataset:
> data("mydataset") # data(mydataset) works as well, but quoted is preferable - less risk of conflict with another object coincidentally named "mydataset" as well