Basically, I have the following say:
counter <- 3
k <- 9999
I would like to get R to print the following:
on the 3rd count: 9999
Does anyone what command should I use to do this? Please spell it out for me ,as I am completely new to R.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The basic construction is
You’ll have to be a little clever to choose the right suffix for the digit (i.e. “rd” after 3, “th” after 4-9, etc. Here’s a function to do it:
}
Thus:
You need to set the
separgument because by defaultpasteinserts a blank space in between strings.