Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Rdata input file #14

Open
davidwedge opened this issue May 5, 2022 · 2 comments
Open

.Rdata input file #14

davidwedge opened this issue May 5, 2022 · 2 comments
Assignees

Comments

@davidwedge
Copy link
Member

RunDP currently looks for a file dataset.RData in the outdir, and reads in data from this file before running DirichlelProcessClustering. This leads to problems if running DPClust with an output directory that has been previously used, as input data is overwritten with data from a previous run. A possible fix is to add the samplename / seed / date to the Rdata filename.

@Avramis
Copy link
Contributor

Avramis commented Jun 14, 2024

I created a branch named "Adjust_Rdata_in_DirichletProcessClustering" to address the issue. Instead of using "dataset.RData" as the file name, I introduced a variable called rdata_file_name.
The rdata_file_name variable is constructed as follows:
rdata_file_name = paste(paste0("Seed-", seed), paste0("Date-", chartr(" ", "", Sys.time())), "dataset.RData", sep = "")
This adds the seed and system time to the file name.
The rdata_file_name variable is then used as the file name in all instances, replacing the hardcoded "dataset.RData" string.

P.S. If including the exact time in the file name is too specific, we can use the following command to include only the date:
rdata_file_name = paste(paste0("Seed-", seed), paste0("Date-", Sys.Date()), "dataset.RData", sep = "_")

@Avramis
Copy link
Contributor

Avramis commented Jun 14, 2024

@MiaoGaoUK, could you please review the changes in the "Adjust_Rdata_in_DirichletProcessClustering" branch and merge them into the main "DPClust" branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants