Skip to content

Search Archives

Search tips
from:Name Search by author name, e.g. from:Duncan Murdoch "exact phrase" Match an exact phrase word1 word2 Match messages containing both words Date range Use the date pickers to filter results to a time period

Use the list dropdown to narrow results to a specific mailing list. Combine from: with other terms to filter by author and content.

10 results for “from:P Tennant”

difference
P Tennant · Oct 28, 2016 · r-help

Hi, You could use an anonymous function to operate on each `year-block' of your dataset, then assign the result as a new column: d <- data.frame(year=c(rep(2001, 3), rep(2002, 3)), num=c(25,75,150...

About reshape dataset
P Tennant · Oct 22, 2016 · r-help

You could convert your data from a wide format to a long format using the reshape function in base R: DF2 <- reshape(DF, direction="long", idvar=names(DF)[1:3], varying=c("site1_elev", "site1_temp", "site2_elev", "site2_temp...

About data manipulation
P Tennant · Nov 26, 2016 · r-help

Hi, It may help that: aggregate(DF$total, list(DF$note, DF$id, DF$month), mean) should give you means broken down by time slice (note), id and month. You could then subset means for GA or GB from the...

remove
P Tennant · Feb 11, 2017 · r-help

Hi Jeff, Why do you say ave() is better suited *because* it always returns a vector that is just as long as the input vector? Is it because that feature (of equal length), allows match() to be avoided, and as...

remove
P Tennant · Feb 11, 2017 · r-help

Hi Val, The by() function could be used here. With the dataframe dfr: # split the data by first name and check for more than one last name for each first name res <- by(dfr, dfr['first'], function(x) length(unique...

Confused about using data.table package,
P Tennant · Feb 21, 2017 · r-help

aggregate(), tapply(), do.call(), rbind() (etc.) are extremely useful functions that have been available in R for a long time. They remain useful regardless what plotting approach you use - base graphics, lattice or the more recent ggplot. Philip On 22...

remove
P Tennant · Feb 12, 2017 · r-help

Val, Working with R's special missing value indicator (NA) would be useful here. You could use the na.strings arg in read.table() to recognise "-" as a missing value: dfr <- read.table( text= 'first week last Alex 1 West...

single strip for the same group in dotplot lattice
P Tennant · Feb 22, 2017 · r-help

Hi Luigi, I'm afraid I don't understand your toy data as you've described it, but if you really don't have run 2 for target A, and don't have run 1 for target B, why not...

lattice graph with free scales and reversed axis values
P Tennant · Nov 5, 2016 · r-help

Hi Naresh, You could calculate the ranges explicitly and then supply to scales(): holdRange <- vector('list', length(unique(my.df$name))) for(i in 1:length(holdRange)){ holdRange[[i]] <- rev(range(my.df$x[my.df$name==unique(my.df...

difference
P Tennant · Oct 29, 2016 · r-help

Hi, As Jeff said, more than one grouping variable can be supplied, and there is an example at the bottom of the help page for ave(). The same goes for by(), but the order that you supply the grouping variables...

Can't find what you're looking for? Try searching with Google .