similar to: list manipulation

Displaying 5 results from an estimated 5 matches similar to: "list manipulation"

2008 Dec 09
2
assign()ing within apply
Hello, I'm trying to convert a character column in several dataframes to lower case. ### # # Sample data and 'spp' column summaries: # dput(ban.ovs.1993[sample(row.names(ban.ovs.1993), 20), 1:4]) ban.ovs.93 <- structure(list(oplt = c(43L, 43L, 38L, 26L, 35L, 8L, 39L, 1L, 34L, 50L, 10L, 29L, 31L, 24L, 18L, 12L, 27L, 49L, 28L, 51L), rplt = c(NA_integer_, NA_integer_,
2008 Oct 09
1
YALAQ - Yet Another LApply Question
Hello, Two lapply questions (system info and sample data below): 1) Why does the first form of command1 add the name of y _after_ the str() output rather than before as does the second (preferred) form? # command1 version1 invisible(lapply(ls(pattern='bn'), function(y) cat(y, "\n", str(get(y)), "\n") )) # command1 version2 (preferred output)
2008 Feb 08
1
Can I index a dataframe with a reference from/to a second dataframe?
Hello, I am unable to figure out how to code a new column in a data frame based on an existing column that matches a column in a reference data frame, in a relational-db fashion. I would like this to maintain a minimum set of reference tables that may be reused over several similar datasets. Specifically, I have two data frames as listed below, 'Bos' and 'tree.' For each case in
2008 Jun 04
1
ggplot questions
Hello, A few questions about the following examples: 1. Why do the two plotting versions not produce the same result? 2. Is the 'scale_x_continuous' (or *_y_* or *_*_discrete) geom the best way to setup grids (as in visual guide-lines) in polar (or for that matter, any) coordinate system? 3. Why do these commands appear to generate 3 plot pages each? 4. Perhaps more questions to follow
2008 Jun 06
6
Subsetting to unique values
I want to take the first row of each unique ID value from a data frame. For instance > ddTable <- data.frame(Id=c(1,1,2,2),name=c("Paul","Joe","Bob","Larry")) I want a dataset that is Id Name 1 Paul 2 Bob > unique(ddTable) Will give me all 4 rows, and > unique(ddTable$Id) Will give me c(1,2), but not accompanied by the name column.