Skip to content

Commit

Permalink
changing examples in the functions.R
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardojo committed Sep 14, 2023
1 parent d66b1a3 commit a40c214
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .Rproj.user/02275A6F/pcs/source-pane.pper
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"activeTab": 0
"activeTab": 2
}
1 change: 1 addition & 0 deletions .Rproj.user/02275A6F/rmd-outputs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/var/folders/6g/3y4xtlkx5tdf56sf5l6ggy380000gn/T//Rtmp9Eezg7/preview-af449c30689.html
/var/folders/6g/3y4xtlkx5tdf56sf5l6ggy380000gn/T//Rtmp9Eezg7/preview-ae36caac5e0.html
/var/folders/6g/3y4xtlkx5tdf56sf5l6ggy380000gn/T//Rtmp5srXow/preview-c45d79ef9df7.html
/var/folders/6g/3y4xtlkx5tdf56sf5l6ggy380000gn/T//RtmplnJ6g9/preview-11fe457c4e89.html



Expand Down
4 changes: 2 additions & 2 deletions .Rproj.user/02275A6F/sources/prop/B14A132A
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"tempName": "Untitled1",
"source_window_id": "",
"Source": "Source",
"cursorPosition": "51,25",
"scrollLine": "0"
"cursorPosition": "93,102",
"scrollLine": "84"
}
9 changes: 4 additions & 5 deletions R/functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#' @export
#'
#' @examples
#' XML.to.ggPlantmap("arabidopsis.root.crossection.xml")
#' XML.to.ggPlantmap("ggPm.sample.xml")
XML.to.ggPlantmap <- function(data) {
xml.ROI <- XML::xmlToList(data)
final.ROI <- NULL
Expand Down Expand Up @@ -69,7 +69,7 @@ ggPlantmap.plot <- function(data,layer=ROI.name,linewidth=0.5,show.legend=T) {
#' @export
#'
#' @examples
#' ggPlantmap.merge(map=ggPm.At.seed.developmentalseries,value=ggPm.At.seed.expressionsample,id.x="ROI.name")
#' ggPlantmap.merge(map=ggPm.At.seed.developmentalseries,value=ggPm.seed.expression.sample,id.x="ROI.name")
ggPlantmap.merge <- function(map,value,id.x,id.y=id.x) {
map %>%
merge(value,by.x={{id.x}},by.y={{id.y}},all.x=T) %>%
Expand All @@ -90,9 +90,8 @@ ggPlantmap.merge <- function(map,value,id.x,id.y=id.x) {
#' @export
#'
#' @examples
#' quant.data <- ggPlantmap.merge(map=ggPm.At.seed.developmentalseries,value=ggPm.At.seed.expressionsample,id.x="ROI.name")
#' ggPlantmap.heatmap(map.quant=quant.data,value.quant=gene.expression,linewdith=1,show.legend=T) +
#' scale_fill_gradient(low="white",high="red")
#' quant.data <- ggPlantmap.merge(map=ggPm.At.seed.developmentalseries,value=ggPm.seed.expression.sample,id.x="ROI.name")
#' ggPlantmap.heatmap(map.quant=quant.data,value.quant=AT5G47670.expression,linewdith=1,show.legend=T)
ggPlantmap.heatmap <- function(map.quant,value.quant=value.quant,show.legend=T,linewidth=0.5) {
ggPlantmap <- map.quant
ar <- (max(ggPlantmap$y) - min(ggPlantmap$y))/(max(ggPlantmap$x) - min(ggPlantmap$x)) ## recording the aspect ratio of the whole image to adjust it in the final plot.
Expand Down

0 comments on commit a40c214

Please sign in to comment.