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
 
The standard _A " operator" maps a Null Hypothesis Ho into a decision set { Do not reject:=1 and reject :=0}. In this sense ( HA)_A , makes no sense. Since H0, HA aren't exhaustive, can we find an alternative operator, _A' , so that ( H_A)_A' makes sense? Isn't Pearson Neyman related to this? Hope I'm making sense. Edit: I was motivated by a superficial similarity of the idea with double transposition of matrices M, with ## (M^{T})^{T}=M##, and just wanted to see if it made sense to talk...

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