-
Notifications
You must be signed in to change notification settings - Fork 21
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
Summary and print functions #4
Comments
I'm working on that for now, and I'll create a Pull Request when I've finished. |
Thanks for contributing. Thiago, do you suggest this for all functions? I can work at the same time in other functions different from that you are working. Thanks |
Yes, I think it will be useful for end-users to have print and summary options for all functions. Clearly, each one's utility may vary from function to function as sometimes a summary has the same information as a print. I'll leave it up to you to update the other functions because I can spend my time reviewing another part. Ok? |
Please, note in the pull request I sent you, some changes in the main function were added (I added a class). I think will be good to add this part to all other functions as well. |
Thanks for the nice work on the CRD function. I accepted the pull. I will use those ideas for implementing your suggestions in all of rest main functions. |
@DidierMurilloF How are you doing with this issue? Please, if you have any questions about our discussion here, let me know. I've seen you have made several improvements in all functions. Great job! |
Dear Thiago, thank you for asking. Just now I completed this issue. I adapted for each function proposed in the package the summary and print functions that you wrote. Now the end-user can call print and summary to all functions in FielDHub. Thank you so much for your contributions in all of this process. I pushed those changes. Please, let me know if you have any questions about it. Since we finished all suggestions and changes proposed in FieDHub, we are looking forward to receiving any inquiries in the process to get FielDHub in JOSS. Thank you! Best, Didier Murillo |
Let me show you an example: > library(FielDHub)
> # Example 1: Generates a split plot design SPD with 4 whole plots, 2 sub plots per whole plot,
> # and 4 reps in an RCBD arrangement. This in for a single location.
> SPDExample1 <- split_plot(wp = 4, sp = 2, reps = 5, l = 1,
+ plotNumber = 101,
+ seed = 14,
+ type = 2,
+ locationNames = "FARGO")
> print(SPDExample1)
Split Plot Design
Information on the design parameters:
List of 8
$ WholePlots : int [1:4] 1 2 3 4
$ SubPlots : int [1:2] 1 2
$ locationNumber: num 1
$ locationNames : chr "FARGO"
$ plotNumbers : num 101
$ typeDesign : chr "RCBD"
$ seed : num 14
$ idDesign : num 5
10 First observations of the data frame with the split_plot field book:
ID LOCATION PLOT REP WHOLE-PLOT SUB-PLOT TRT_COMB
1 1 FARGO 101 1 1 1 1|1
2 2 FARGO 101 1 1 2 1|2
3 3 FARGO 102 1 4 2 4|2
4 4 FARGO 102 1 4 1 4|1
5 5 FARGO 103 1 3 2 3|2
6 6 FARGO 103 1 3 1 3|1
7 7 FARGO 104 1 2 2 2|2
8 8 FARGO 104 1 2 1 2|1
9 9 FARGO 201 2 3 1 3|1
10 10 FARGO 201 2 3 2 3|2
> summary(SPDExample1)
Split Plot Design:
1. Information on the design parameters:
List of 8
$ WholePlots : int [1:4] 1 2 3 4
$ SubPlots : int [1:2] 1 2
$ locationNumber: num 1
$ locationNames : chr "FARGO"
$ plotNumbers : num 101
$ typeDesign : chr "RCBD"
$ seed : num 14
$ idDesign : num 5
2. Layout randomization for each location:
[[1]]
PLOT REP Whole-plot Sub-plot
[1,] "101" "1" "1" "1 2"
[2,] "102" "1" "4" "2 1"
[3,] "103" "1" "3" "2 1"
[4,] "104" "1" "2" "2 1"
[5,] "201" "2" "3" "1 2"
[6,] "202" "2" "2" "2 1"
[7,] "203" "2" "4" "2 1"
[8,] "204" "2" "1" "2 1"
[9,] "301" "3" "4" "2 1"
[10,] "302" "3" "2" "1 2"
[11,] "303" "3" "1" "2 1"
[12,] "304" "3" "3" "2 1"
[13,] "401" "4" "1" "2 1"
[14,] "402" "4" "3" "2 1"
[15,] "403" "4" "2" "2 1"
[16,] "404" "4" "4" "1 2"
[17,] "501" "5" "3" "1 2"
[18,] "502" "5" "1" "2 1"
[19,] "503" "5" "2" "2 1"
[20,] "504" "5" "4" "2 1"
3. Structure of the data frame with the split_plot field book:
'data.frame': 40 obs. of 7 variables:
$ ID : int 1 2 3 4 5 6 7 8 9 10 ...
$ LOCATION : chr "FARGO" "FARGO" "FARGO" "FARGO" ...
$ PLOT : num 101 101 102 102 103 103 104 104 201 201 ...
$ REP : int 1 1 1 1 1 1 1 1 2 2 ...
$ WHOLE-PLOT: int 1 1 4 4 3 3 2 2 3 3 ...
$ SUB-PLOT : int 1 2 2 1 2 1 2 1 1 2 ...
$ TRT_COMB : chr "1|1" "1|2" "4|2" "4|1" ...
> |
Thanks, @DidierMurilloF. You are making excellent work/improvement in the package. |
Hi,
I noticed that there are no print and summary functions for each function proposed in the package. I have felt the need for print and summary functions because when, for example, we increase the number of treatments, locations and so on, and print the object, a list of two objects is automatically printed, which sometimes ends up polluting the R output, mainly, due to the "fieldBook" object in that list.
In this sense, I have worked on the following possible suggestions for you:
See the new output example below:
I would suggest the authors consider both print and summary functions for each function related to experimental design. Clearly, feel free to modify my first suggestion, you also can add some more parameters in each function, e.g.:
Another alternative could be to include only a print function with the output of the summary function. Just think about it. The optimal idea is to have both functions with non overlapped outputs.
The text was updated successfully, but these errors were encountered: