Sha256: 9dbf2c231a84abc675a2bfcb6c602a2fc00430d07704921de63e90744eef1215

Contents?: true

Size: 294 Bytes

Versions: 219

Compression:

Stored size: 294 Bytes

Contents

to_rna <- function(dna) {
  
  dna_to_rna <- list(G = "C", C = "G", T = "A", A = "U")
  
  func <- function(x) {
    if (!(x %in% c("G", "C", "T", "A"))) {
      stop("invalid dna strand")
    }
    dna_to_rna[[x]]
  }
  
  paste(lapply(strsplit(dna, "")[[1]], FUN = func), collapse = "")
  
}

Version data entries

219 entries across 219 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/r/exercises/rna-transcription/example.R
trackler-2.2.1.179 tracks/r/exercises/rna-transcription/example.R
trackler-2.2.1.178 tracks/r/exercises/rna-transcription/example.R
trackler-2.2.1.177 tracks/r/exercises/rna-transcription/example.R
trackler-2.2.1.176 tracks/r/exercises/rna-transcription/example.R
trackler-2.2.1.175 tracks/r/exercises/rna-transcription/example.R
trackler-2.2.1.174 tracks/r/exercises/rna-transcription/example.R
trackler-2.2.1.173 tracks/r/exercises/rna-transcription/example.R
trackler-2.2.1.172 tracks/r/exercises/rna-transcription/example.R
trackler-2.2.1.171 tracks/r/exercises/rna-transcription/example.R
trackler-2.2.1.170 tracks/r/exercises/rna-transcription/example.R
trackler-2.2.1.169 tracks/r/exercises/rna-transcription/example.R
trackler-2.2.1.167 tracks/r/exercises/rna-transcription/example.R
trackler-2.2.1.166 tracks/r/exercises/rna-transcription/example.R
trackler-2.2.1.165 tracks/r/exercises/rna-transcription/example.R
trackler-2.2.1.164 tracks/r/exercises/rna-transcription/example.R
trackler-2.2.1.163 tracks/r/exercises/rna-transcription/example.R
trackler-2.2.1.162 tracks/r/exercises/rna-transcription/example.R
trackler-2.2.1.161 tracks/r/exercises/rna-transcription/example.R
trackler-2.2.1.160 tracks/r/exercises/rna-transcription/example.R