Displaying 11 results from an estimated 11 matches for "akwsimmo".
2023 Feb 12
2
Removing variables from data frame with a wile card
...mment in if you want to accelerate their uptake.
As I understand it, one of the main reasons tibbles exist is because of drop=TRUE. List-slice (single-dimension) indexing works equally well with both standard and tibble types of data frames.
On February 12, 2023 2:30:15 PM PST, Andrew Simmons <akwsimmo at gmail.com> wrote:
>drop = FALSE means that should the indexing select exactly one column, then
>return a data frame with one column, instead of the object in the column.
>It's usually not necessary, but I've messed up some data before by assuming
>the indexing always retur...
2023 Jan 14
1
Removing variables from data frame with a wile card
...ect columns that start with or end with or contain some pattern
> and I find that way easier.
>
>
>
> -----Original Message-----
> From: R-help <r-help-bounces at r-project.org> On Behalf Of Steven Yen
> Sent: Saturday, January 14, 2023 7:49 AM
> To: Andrew Simmons <akwsimmo at gmail.com>
> Cc: R-help Mailing List <r-help at r-project.org>
> Subject: Re: [R] Removing variables from data frame with a wile card
>
> Thanks to all. Very helpful.
>
> Steven from iPhone
>
> > On Jan 14, 2023, at 3:08 PM, Andrew Simmons <akwsimmo at gmai...
2023 Jan 14
3
Removing variables from data frame with a wile card
...s with lots of tools that let you select columns that start with or end with or contain some pattern and I find that way easier.
-----Original Message-----
From: R-help <r-help-bounces at r-project.org> On Behalf Of Steven Yen
Sent: Saturday, January 14, 2023 7:49 AM
To: Andrew Simmons <akwsimmo at gmail.com>
Cc: R-help Mailing List <r-help at r-project.org>
Subject: Re: [R] Removing variables from data frame with a wile card
Thanks to all. Very helpful.
Steven from iPhone
> On Jan 14, 2023, at 3:08 PM, Andrew Simmons <akwsimmo at gmail.com> wrote:
>
> ?You'...
2023 Jan 14
2
Removing variables from data frame with a wile card
Thanks to all. Very helpful.
Steven from iPhone
> On Jan 14, 2023, at 3:08 PM, Andrew Simmons <akwsimmo at gmail.com> wrote:
>
> ?You'll want to use grep() or grepl(). By default, grep() uses extended
> regular expressions to find matches, but you can also use perl regular
> expressions and globbing (after converting to a regular expression).
> For example:
>
> grepl(&qu...
2023 Jan 14
1
Removing variables from data frame with a wile card
...elect columns that start with or end with or contain some pattern and I find that way easier.
>
>
>
> -----Original Message-----
> From: R-help <r-help-bounces at r-project.org> On Behalf Of Steven Yen
> Sent: Saturday, January 14, 2023 7:49 AM
> To: Andrew Simmons <akwsimmo at gmail.com>
> Cc: R-help Mailing List <r-help at r-project.org>
> Subject: Re: [R] Removing variables from data frame with a wile card
>
> Thanks to all. Very helpful.
>
> Steven from iPhone
>
>> On Jan 14, 2023, at 3:08 PM, Andrew Simmons <akwsimmo at gm...
2023 Jan 15
2
Removing variables from data frame with a wile card
...u select columns that start with or end with or contain some pattern and I find that way easier.
>
>
>
> -----Original Message-----
> From: R-help <r-help-bounces at r-project.org> On Behalf Of Steven Yen
> Sent: Saturday, January 14, 2023 7:49 AM
> To: Andrew Simmons <akwsimmo at gmail.com>
> Cc: R-help Mailing List <r-help at r-project.org>
> Subject: Re: [R] Removing variables from data frame with a wile card
>
> Thanks to all. Very helpful.
>
> Steven from iPhone
>
>> On Jan 14, 2023, at 3:08 PM, Andrew Simmons <akwsimmo at gmail...
2023 Jan 15
0
Removing variables from data frame with a wile card
...elect columns that start with or end with or contain some pattern and I find that way easier.
>
>
>
> -----Original Message-----
> From: R-help <r-help-bounces at r-project.org> On Behalf Of Steven Yen
> Sent: Saturday, January 14, 2023 7:49 AM
> To: Andrew Simmons <akwsimmo at gmail.com>
> Cc: R-help Mailing List <r-help at r-project.org>
> Subject: Re: [R] Removing variables from data frame with a wile card
>
> Thanks to all. Very helpful.
>
> Steven from iPhone
>
>> On Jan 14, 2023, at 3:08 PM, Andrew Simmons <akwsimmo at gm...
2023 Jan 14
1
Removing variables from data frame with a wile card
You'll want to use grep() or grepl(). By default, grep() uses extended
regular expressions to find matches, but you can also use perl regular
expressions and globbing (after converting to a regular expression).
For example:
grepl("^yr", colnames(mydata))
will tell you which 'colnames' start with "yr". If you'd rather you
use globbing:
2023 Jan 27
1
implicit loop for nested list
I would use replicate() to do an operation with random numbers repeatedly:
```
mysim <- replicate(10, {
two.mat <- matrix(rnorm(4), 2, 2)
four.mat <- matrix(rnorm(16), 4, 4)
list(two.mat = two.mat, four.mat = four.mat)
})
```
which should give you a matrix-list. You can slice this matrix-list
just like normal, then cbind it in one step:
```
two.mat <-
2023 Apr 09
1
can't install nser...
It says that nser requires the most recent version of magrittr that you do
not have installed. You must update magrittr before attempting to install
nser:
update.packages(oldPkgs = "magrittr")
or at the prompt you were presented before, choose to update magrittr
before installing nser.
On Sun, Apr 9, 2023, 17:55 akshay kulkarni <akshay_e4 at hotmail.com> wrote:
> Dear
2023 Jan 09
1
return value of {....}
Returning the last value of { is the basis of functions not needing a
return statement. Before R invokes a function (specifically a closure), it
creates a new context. When R evaluates a call to return, it looks for a
context to return from and finds the context of function, ending the
context and the evaluation of the function body early. However, if you
don't use return, R just returns the