Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 73883

Use this tag for any *on-topic* question that (a) involves `R` either as a critical part of the question or expected answer, & (b) is not *just* about how to use `R`.

2 votes

R: how many equal letters between two strings

Just to add to stochazesthai's response, you can use unique(): length(unique(as.vector(unlist(strsplit(x,"")),mode="list"))) length(unique(as.vector(unlist(strsplit(y,"")),mode="list"))) This shoul …
Abdou's user avatar
  • 258
6 votes
Accepted

R: how to separate date-time data types

The Time variable in your dataset is formatted "%d/%m/%Y %H:%M" but your code's format is "%m/%d/%Y". Perhaps, that's why you're getting NAs. Humidity <- c(37.79, 42.34, 52.16, 44.57, 43.83, 44.59) R …
Abdou's user avatar
  • 258
2 votes
Accepted

R: Express the residuals of a linear model in percentages

You should use the resid() function to get your residuals (i.e. errors). You can also formulate the values in the percentage, although I doubt that this may not be that meaningful. In any case, the fo …
Abdou's user avatar
  • 258