A little bit of trouble getting hold of what are the \$ and %% terms.

As I understand I can use the \$ term to pull a certain value from a function (e.g. t.test(x)\$p.value), but I'm not sure if this is a universal definition. I also know it is possible to use this to specify to pull certain data.

I also want to know about the use of the %% term, in particular, if I am placing a value in between it (e.g. %x%) I am aware of using it as a modulator or remainder e.g. 7 %% 5 returns 2. Perhaps I am being ignorant and this is not real?
Jun 2, 2022 654 views

According to help('percent in percent'), percent in percent is a value matching function that "returns a vector of the places of (first) matches of its first parameter in its second." This implies that you might compare vectors of various lengths to determine whether at least one element in one vector matches an element in another. The output will have a length equal to the vector being compared (the first one).

1:2 in percentage return (1:2,5)
#[1] True, True

Replicate (1:2,5) in percent 1:2 #[1] True, True, True, True, True, True, True

The output is longer in seconds; take note.
If two things are exactly equal, the comparison operator == is used. The elements of the vectors will be compared element-by-element if they are similar in length. Vectors will be recycled if not. The output's length
• 3,040 points

+1 vote

Which function can I use to clear the console in R and RStudio ?

Description                   Windows & Linux           Mac Clear console                      Ctrl+L ...READ MORE

How to forecast season and trend of data using STL and ARIMA in R?

You can use the forecast.stl function for the ...READ MORE

Predict weight and height of a person based on his nationality in R

One of the way by which you ...READ MORE

What is the difference between %% and % in R programming?

HI, %% returns remainder in case of numeric ...READ MORE

What is the difference between [] and [[]] notations to access the elements of a list or dataframe in R?

R provides 3 basic indexing operators. Refer ...READ MORE

Difference between the == and %in% operators in R

percent in percent "returns a vector of ...READ MORE

Difference between the == and %in% operators in R

According to help('percent in percent'), percent in ...READ MORE

How to make loop for one-at-a time logistic regression in R?

You're probably looking for something similar to ...READ MORE