Skip to contents

Makes start..end one segment (e.g. a passage marked in the app). Segments it overlaps are shortened; a segment that contains it entirely is split into up to three parts. Whitespace at the edges is trimmed.

Usage

qda_segment_define(source, start, end)

Arguments

source

Source id or unique name.

start, end

1-based inclusive character offsets.

Value

Invisibly, the new segments.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
#> # A tibble: 1 × 5
#>      id name             format chars status
#>   <int> <chr>            <chr>  <int> <chr> 
#> 1     1 interview_01.txt txt      856 ok    
qda_segment_define(1, start = 120, end = 200)
qda_source_segments(1)
#> # A tibble: 9 × 4
#>   segment start   end text                                                      
#>     <int> <int> <int> <chr>                                                     
#> 1       1     1   101 DEMO FILE - fictional interview written for jellyqda. All…
#> 2       2   104   119 Interviewer: Goo                                          
#> 3       3   120   200 d morning, and thank you for taking the time. Could you b…
#> 4       4   201   202 f?                                                        
#> 5       5   205   325 Respondent: Sure. I am 34 years old and I have been worki…
#> 6       6   328   370 Interviewer: How did you get into this job?               
#> 7       7   373   605 Respondent: After studying business informatics I first w…
#> 8       8   608   647 Interviewer: What motivates you at work?                  
#> 9       9   650   856 Respondent: Above all the direct contact with our custome…
qda_close()