similar to: subsetting with greater than and less than indexing

Displaying 20 results from an estimated 600 matches similar to: "subsetting with greater than and less than indexing"

2013 Mar 29
1
multiple plots and looping assistance requested (single plot)
HI Irucka, Please check this: temp<- structure(list(`:Bostoncitydata` = structure(list(Month = c(1L, 2L, 3L, NA), Data1 = c(1.5, 12.3, 11.4, NA), Data2 = c(9.1342, 12.31, 3.5, NA)), .Names = c("Month", "Data1", "Data2"), class = "data.frame", row.names = c(NA, -4L)), `:Chicagocitydata` = structure(list(Month = c(1L, 2L, 3L, 4L, 5L, NA), Data1 = c(1.52,
2013 Mar 21
0
how do I read certain files from a directory based on number of columns?
Hi Arun, thank you. I will look through that later on today when I get a chance. I have to complete another part of this project now. Irucka <-----Original Message-----> >From: arun kirshna [via R] [ml-node+s789695n4661145h71@n4.nabble.com] >Sent: 3/12/2013 10:35:39 PM >To: iruckaE@mail2world.com >Subject: Re: how do I read certain files from a directory based on number of
2013 May 01
0
log returns, error
Hi, I could not open the file. Can you load the data into R and then use the dput function? The first link deals with dput. The latter 2 links are for dealing with NAs in data. http://www.inside-r.org/r-doc/base/dput dput {base} http://r.789695.n4.nabble.com/subset-without-removing-NAs-td3482011.html R help - subset without removing NAs
2013 Feb 13
0
seasonal sum and mean and combine multiple, different data frames in .csv
Hi Irucka, No problem. I guess this could be done using: Sample data: Dailydo<- structure(list(Date = structure(c(11231, 11232, 11233, 11234, 11235, 11236, 11207, 11208, 11209, 11179, 11180, 11181, 11151, 11152, 11123, 11093, 11064, 11065, 11035, 11036, 11008, 11009, 10979, 10980, 11347, 11348, 11380, 11381, 11410, 11406, 11438, 11439, 11470, 11502, 11528, 11560, 11561, 11593, 11594,
2013 Mar 21
0
"[[i]]$" <- "" indexing and lapply
Hi Arun, thank-you very much! The 2nd option worked perfectly. That was what I wanted. Now, I have another question. I am using the R packages dataRetrieval and EGRET from https://github.com/USGS-CIDA/WRTDS. I have 2 objects Daily and Sample that have the naming convention (Names = "21NC02WQ.C1000000" or whatevver the list of site names happens to be) that I need to have after running
2015 Aug 18
2
Server certificate verification failed
Hi all, I have the following in my apt sources.list file: deb https:// /bin/linux/ubuntu trusty/ I issued the following command to obtain the public key: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 I am receiving the following error message though after updating the Synaptic package manager: Failed to fetch
2012 Dec 19
2
probability of binary data
Hi, how are you? I am trying to replicate the binary data f(2) function in the attached document by starting with the simple example found below: observed <- matrix(c(0, 1, 0, 0, 1, 1, 1, 0, 0),3,3,byrow=TRUE) data <- matrix(c(1, 1, 0, 0, 1, 0, 0, 0, 1),3,3,byrow=TRUE) f2 = sum(probability of the matrix element where the matrix element is present in both the observed and the
2013 Jan 27
1
lapply and SpatialGridDataFrame error
Hi all, I have a set of 54 files that I need to convert from ASCII grid format to .shp files to .bnd files for BayesX. I have the following R code to operate on those files: library(maptools) library(Grid2Polygons) library(BayesX) library(BayesXsrc) library(R2BayesX) readfunct <- function(x) { u <- readAsciiGrid(x) } modfilesmore <- paste0("MaxFloodDepth_", 1:54,
2012 Dec 31
4
error when using subset (0 observations)
Hi, how are you? My name is Irucka Embry and I would like assistance on properly subsetting some data obtained from a .csv file. > file <-"info_n.csv" > INFO<- getMetaDataFromFile(file) INFO is 92 observations of 14 variables > INFO<- subset(INFO,site.no==02169570) INFO is 0 observations of 14 variables When the site.no is used I should have 1 observation of 14
2012 Dec 20
4
comparison of large data set
Hi, how are you? I have the following truncated R code: fileobs <- "MaxFloodDepth_Observed.txt" file1 <- "MaxFloodDepth_1.txt" file2 <- "MaxFloodDepth_2.txt" ... file54 <- "MaxFloodDepth_54.txt" observeddepth = as.matrix(read.ascii.grid(fileobs)$data) observeddepth[observeddepth!=0]<-1 modeldepth1 =
2012 Dec 21
0
variable names in numeric list and Bayesian inference
Hi everyone, I have received assistance from my previous post (comparison of large data set), but I still need some assistance. This is the revised code (along with some new code that I am requesting assistance with correcting): files <- paste0("MaxFloodDepth_", 1:54, ".txt") fileobs <- "MaxFloodDepth_Observed.txt" readfun <- function(x) { u <-
2013 Jan 09
4
select partial name and full name columns
Hi, I have the following function: getDataFromDVFileCustom <- function (file, hasHeader = TRUE, separator = "\t") { DVdatatmp <- as.matrix(read.table(file, sep = "\t", fill = TRUE, comment.char = "#", as.is = TRUE, stringsAsFactors = FALSE, na.strings = "NA")) DVdatatmper <- as.matrix(DVdatatmp[ , c("datetime",
2013 Mar 07
5
multiple plots and looping assistance requested (revised codes)
Hi Irucka, I tried it and was able to plot it without any errors.? Here, your code indicates you need two lines. temper[[i]][1] ?temper[[1]][1] # which is the column 1. ? Month 1???? 1 2???? 2 3???? 3 ?temper[[1]][2] #? Data1 #1?? 1.5 #2? 12.3 #3? 11.4 Suppose I use names(temper) instead of seq_along(temper) pdf("irucka.pdf") ?lapply(names(temper),function(i)
2013 Mar 05
2
multiple plots and looping assistance requested
Hi all, I have a couple of questions. 1) Is there a more effective way to remove the following pattern (patternrm) from the station_id_Timeseries (see below) patternrm <- c(_2000_4_OND, _2001_1_JFM, _2001_2_AMJ, _2001_3_JAS, _2001_4_OND, _2002_1_JFM, _2002_2_AMJ, _2002_3_JAS, _2002_4_OND, _2003_1_JFM, _2003_2_AMJ, _2003_3_JAS, _2003_4_OND, _2004_1_JFM, _2004_2_AMJ, _2004_3_JAS, _2000_4_OND) #
2013 Jan 15
2
error in for loop in function (object not found)
Hi all, I have attached the function file (revisedfunction) and the list of station IDs (StationIDs) in .pdf format. I have written a function to perform various operations on the station IDs in two groups. The first 6 station IDs require one less step than the remaining 68 station IDs. The file referenced at the beginning of the function is the file containing the StationIDs. > file =
2007 Aug 01
3
"Cut marks" on a plot's y-axis to indicate it is a truncated axis
Hi, I've plotted a Kaplan-Meier curve but the curves only range from 0.7 to 1 on the y-axis. Therefore I have used: - ylim=c(0.7,1) [although I think convention dictates that you plot 0.5 to 1 to show the median? A few papers I've read have done this]?? BUT, I would like a symbol like // (but rotated 90 degrees) to indicate that the y-axis has been truncated. I'd need to be able to
2012 Nov 28
7
zeros in double matrix rather than character matrix
Hi, how are you? I have 1000 total columns with 100 rows and I have shown 4 columns of 100 rows below. I want the zeros to be read in as numerical or integer values rather than a character. Right now I have a 100x0 character matrix rather than a 100x1000 double matrix. What do I need to do to read in a .csv spreadsheet with counting the zeros as a numerical or integer value? Thank-you. Irucka
2007 Mar 05
4
Identifying points in a plot that have duplicate values
I have code like this: - #----------------------------------------------------------------------- ------------------------------------------------------ x=scan() 0 0 0 0 0 1 2 3 4 y=scan() 1 1 1 2 2 1 3 4 5 plot(x,y) identify(0,1,3) #Allows me to select manually to identify co-ordinate (0,1) as being duplicated 3 times identify(0,2,2) #Allows me to select manually to identify co-ordinate
2007 Aug 16
1
(coxph, se) Obtaining standard errors of coefficients from coxph to store
Hi all, I'm wanting to be able to find and store the z-score of coxph below: - modz=coxph(Surv(TSURV,STATUS)~RAGE+DAGE+REG_WTIME_M+CLD_ISCH+POLY_VS, data=kidneyT,method="breslow") I know summary(modz) will give me this, but how do i extract the standard error or z-score values in a similar way to obtaining the coefficients by coef(modz) ? I think it must be something to do with
2007 Aug 06
1
(Censboot, Z-score, Cox) How to use Z-score as the statistic within censboot?
Dear R Help list, My question is regarding extracting the standard error or Z-score from a cph or coxph call. My Cox model is: - modz=cph(Surv(TSURV,STATUS)~RAGE+DAGE+REG_WTIME_M+CLD_ISCH+POLY_VS, data=kidneyT,method="breslow", x=T, y=T) I've used names(modz) but can't see anything that will let me extract the Z scores for each coefficient or the standard errors in the same