How to align braces RStudio

I am looking for an answer to this question:

I'd like to make this the default:

foo <- function(x)
{
    return(x)
}

The default is currently:

foo <- function(x) {
    return(x)
}

When I hit enter before the opening brace RStudio does:

foo <- function(x)
    {
    return(x)
}

Please familiarize yourself with our cross-posting policy. It is not considered OK to just drop a link to a SO question.

The post has been up on SO for 12 days at this time, with a suggestion from a user to post here with possible better luck. I am within the guidelines.

My observation is not about the time delay, it is about just dropping a link here without any description, if you read the guidelines you will find a specific section that says:

Don't just dump a link to your post on another help site

If you posted elsewhere but didn't find a solution, please don't just drop a link to that original post here. A bare link post is missing the details that make it useful and discoverable to people with similar problems in the future. It is also unlikely to entice any potential helpers to click through.

This is more relevant than the first thing you quoted. I will make changes.

I don't understand what you mean with this, I initially posted a link to the forum policy which includes the text I have quoted on my last reply. Maybe you haven't clicked on the link and only read the preview.

That was it. That looked like quoted text, not a link, compared to the forums I frequent.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.