Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Z
Zalpha
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Computational Genetics
Zalpha
Commits
01685bbc
Commit
01685bbc
authored
4 years ago
by
Clare
Browse files
Options
Downloads
Patches
Plain Diff
Fixed bug when all distances are 0 and max_dist not suppied
parent
21bc3f2e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
R/create_LDprofile.R
+4
-0
4 additions, 0 deletions
R/create_LDprofile.R
with
4 additions
and
0 deletions
R/create_LDprofile.R
+
4
−
0
View file @
01685bbc
...
...
@@ -88,6 +88,10 @@ create_LDprofile<-function(dist,x,bin_size,max_dist=NULL,beta_params=FALSE){
}
else
{
#Set max_dist to the maximum distance in the data if it was not supplied
max_dist
<-
max
(
sapply
(
dist
,
function
(
x
){
x
[
length
(
x
)]
-
x
[
1
]}),
na.rm
=
TRUE
)
#If max_dist is now zero then set it equal to bin_size
if
(
isTRUE
(
all.equal
(
max_dist
,
0
))){
max_dist
<-
bin_size
}
}
#Adjusts the max_dist value so it is equal to an increment of bin_size if it isn't already
if
(
!
isTRUE
(
all.equal
(
max_dist
,
assign_bins
(
bin_size
,
max_dist
)))){
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment