Learning R: Writing Functions & More

  • Thread starter Thread starter Tereno
  • Start date Start date
  • Tags Tags
    Functions Writing
Click For Summary
The discussion focuses on using the R programming language to write functions for string manipulation, specifically for counting nucleotide occurrences in a DNA sequence. A user seeks assistance in evaluating the number of 'A' or 'T' nucleotides and summing the counts of 'G' and 'C' nucleotides. They express difficulty with using if-else statements to achieve this. Suggestions for alternative approaches or functions in R are requested. The conversation emphasizes the need for clarity in R's function writing capabilities.
Tereno
Messages
8
Reaction score
0
Does anyone know how to use the R language to write functions and etc?
 
Physics news on Phys.org
Yeah I kinda did..and not to clear about it.
 
R programmation

Does anyone know how to use the R language to write functions for string?

I have this type of string:

ATGTTGCGTGTC

I want to evalute the number of A or T and G and C for every A/T a want to sum 2 for the other 4 I want to have one number...
did you have any suggestion? because with If else I have difficultis
Thanks for any help
 
If there are an infinite number of natural numbers, and an infinite number of fractions in between any two natural numbers, and an infinite number of fractions in between any two of those fractions, and an infinite number of fractions in between any two of those fractions, and an infinite number of fractions in between any two of those fractions, and... then that must mean that there are not only infinite infinities, but an infinite number of those infinities. and an infinite number of those...

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 15 ·
Replies
15
Views
6K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K