search for: charliethebrown77

Displaying 17 results from an estimated 17 matches for "charliethebrown77".

2012 Apr 19
4
call object from character?
Let say I have an object (I hope my terminology is correct) a a <- 12 > a [1] 12 And "a" has been assigned the number 12, or whatever And lets say I have a character "call_A" call_A <- "a" >call_A [1] "a" What is the function "F" that allows this to happen: > F( call_A ) [1] 12 -- View this message in context:
2012 Oct 26
2
deconstructing curve into rising and falling limbs
hello, I have some data that looks similar to this (only not as nice as this): Y <- c(abs(rnorm(100, 0.10, .1)), seq(.10, 1.0, .3)+rnorm(1, 0, .5) , seq(0.8, 4.0, .31)+rnorm(1, 0, .5) , seq(3.9, .20, -.2)+rnorm(1, 0, .5) , abs(rnorm(100, 0.13, .1)) , seq(.10, 1.2, .35)+rnorm(1, 0, .5) , seq(0.7, 6.0, .31)+rnorm(1, 0, .5) , seq(5.9, .23, -.18)+rnorm(1, 0, .5) , abs(rnorm(50, 0.18, .1)) )
2012 Oct 31
3
grep txt file names from html
Sorry, I know I should read a little 1st about this, but I am actually just helping somebody really quick and need help too. I want to grep all of the names of the .txt files mentioned on this html web page: http://www.epa.gov/emap/remap/html/three/data/index.html Thanks ahead of time. -- View this message in context:
2012 Oct 30
2
changing date by +/- days
Hi, Let say I have a date variable like this: structure(1243792800, class = c("POSIXct", "POSIXt"), tzone = "GMT") [1] "2009-05-31 18:00:00 GMT" How can I make it 10 days prior, so: [1] "2009-05-21 18:00:00 GMT" I'm randomly selecting dates from a list and want a second value a set # of days either before or after. Thanks ahead of time.
2012 Oct 31
5
extracting information from txt file
Hello, Here is a link to some data: http://www.epa.gov/emap/html/data/surfwatr/data/mastreams/9396/wchem/chmval.txt I am trying to read this in, and want to use: chmval <- read.table("http://www.epa.gov/emap/html/data/surfwatr/data/mastreams/9396/wchem/chmval.txt", sep=",", skip= 84, header=T) the # 84, for 84 lines skipped needs to be derived from the 5th line of the
2011 Nov 30
2
nls help
Hello, I have data like the following: datum <- structure(list(Y = c(415.5, 3847.83333325, 1942.833333325, 1215.22222233333, 950.142857325, 2399.5833335, 804.75, 579.5, 841.708333325, 494.053571425 ), X = c(1.081818182, 0.492727273, 0.756363636, 0.896363636, 1.518181818, 0.499166667, 1.354545455, 1.61, 1.706363636, 1.063636364 )), .Names = c("Y", "X"), row.names = c(NA,
2012 Jan 27
3
Grabbing Column and Row titles
Please use dput() to post your example matrix. Rambler1 wrote > > I have run into a problem in my code. What I want to accomplish is this: > I have a user input stock symbols into a list and from there I run the > quantmod package to get historical data. I compute the correlation matrix > and then turn that matrix into a simple matrix with 1's or 0's depending > on
2012 Mar 25
2
avoiding for loops
I have data that looks like this: > df1 group id 1 red A 2 red B 3 red C 4 blue D 5 blue E 6 blue F I want a list of the groups containing vectors with the ids. I am avoiding subset(), as it is only recommended for interactive use. Here's what I have so far: df1 <- data.frame(group=c("red", "red", "red", "blue",
2012 Jan 28
0
Graph Titles
Hard to help without a short example dataset (please read posting guide!) posted with dput(). You likely want to "paste" together a title for your graph. see ?paste Rambler1 wrote > > Another simple question that is driving me crazy: > I have a for loop that loops through a matrix and pulls data from two > different variables, computes differences and runs a regression
2012 Feb 04
0
Binding matrices of different sizes
http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=search_page&node=789695&query=cbind+with+different+rows Rambler1 wrote > > I am trying to bind two matrices of different length. They both are one > column and many rows but the rows differ by a few. How am I able to cbind > them together inserting NA's to fill the missing rows and make them the > same
2012 Feb 17
1
incomplete final line found by readTableHeader on 'test.csv'
Hello, I have recently had issues with read.csv where i get the following warning, and this happens on both my OSX and Linux machines. Here is the warning and an example CSV file is attached: Warning message: In read.table(file = file, header = header, sep = sep, quote = quote, : incomplete final line found by readTableHeader on 'test.csv' http://
2012 May 12
1
problem with get() inside of lme()
Hi, In the following lines of code are inside of a function, where "TRAIT1" is a function variable calling a column-name inside of the data.frame "new3". This works just fine: m2 <- lmer(get(TRAIT1) ~ perm.score + (1|site), data=new3) but this will not work, m3 <- lme(get(TRAIT1) ~ perm.score , random= ~1|site, data=new3) I get the following error: Error in
2013 Aug 23
0
Simulated mixed distribution multivariate data
Hi, I want to simulate multivariate data with > 1 distribution type. For example, I would like one normal variate and one poisson variate with a specified correlation structure. Is there a package that has this implemented? Thanks. Chuck [[alternative HTML version deleted]]
2012 Jul 02
3
residuals from lm
Hi, I was playing around with something else and I noticed this matrix code for residuals in a linear model doesn't say what lm() says. Please tell me if I am completely misguided here. data(mtcars) Y <- as.matrix(mtcars[,1]) X <- as.matrix(mtcars[,c(2:11)]) # shouldnt this: H <- X %*% solve(t(X) %*% X) %*% t(X) (diag(dim(H)[1]) - H) %*% Y # be equal to this: residuals(lm(Y~X))
2012 Oct 30
2
POSIXct date missing "time component"
Hi, I have some dates that are giving me a problem, in general the dates look like this: free.dates[60:61] [1] "2009-05-21 23:45:00 GMT" "2009-05-22 00:00:00 GMT" but for some reason, when taken "alone", they look like this: free.dates[60] [1] "2009-05-21 23:45:00 GMT" free.dates[61] [1] "2009-05-22 GMT" # the time component is gone, and
2012 Feb 03
1
Contour plot with messy field data.
Hello, I have some data that will be in the form: structure(list(station = structure(c(20L, 2L, 4L, 19L, 3L, 11L, 1L, 5L, 10L, 12L, 17L, 18L, 6L, 9L, 13L, 16L, 7L, 8L, 15L, 14L ), .Label = c("1", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "2", "3",
2012 Apr 01
4
map and shapefile help
Hi, I want to use map("state") and have the ecoregion shape (please see link) file projected onto this. ftp://ftp.epa.gov/wed/ecoregions/cec_na/NA_CEC_Eco_Level3.zip ftp://ftp.epa.gov/wed/ecoregions/cec_na/NA_CEC_Eco_Level3.zip Could someone please show me how; I have never messed with this sort of thing. Thanks. -- View this message in context: