[R] Request for some help about uncertainty analysis using bootstrap approach

2022-05-30 Thread Bhaskar Mitra
Hello Everyone, I have a query about uncertainty analysis and would really appreciate some help in this regard. I intend to gapfill the NAs in the “X” column of the dataframe (Df1). I have grouped the data using the column “Group” , determined the mean and generated the “Z” column. While I am

[R] Converting data from weekly interval to daily interval

2021-06-08 Thread Bhaskar Mitra
Hello Everyone, I have data at weekly intervals. The data structure is something like this. df1 <- datea 1/7/2020 3 1/14/2020 6 1/21/2021 7 I would like to convert the data from the weekly interval to the daily interval. Something like this. datea 1/7/2020

Re: [R] Help in modifying code to extract data from url

2021-06-08 Thread Bhaskar Mitra
fill missing > columns with NA. > rockchalk::rbindFillStack together data frames > > > -- > > David. > > On 5/20/21 2:19 AM, Jim Lemon wrote: > > Hi Bhaskar, > > If you are using read.table or similar, see the "fill=" argument. > > > >

[R] Help in modifying code to extract data from url

2021-05-19 Thread Bhaskar Mitra
Hello Everyone, I am trying to extract data from a url. The codes work well when the data structure is as follows: X Y 1 2 1 5 1 6 1 7 3 4 However, the code fails when the data structure has no number under the 2nd column (shown below).I get the following error: "Error in data.frame(...,

[R] Request for help to modify sliderInput in RShiny app (conditional statement)

2020-11-17 Thread Bhaskar Mitra
Hello Everyone, I have written certain codes in RShiny app which works fine. There are 3 tabs, "Z1", "Z2" and "Z3". Currently the sliderinput shows up when I click all the 3 tabs. I need to adjust this code so that sliderInput is only visible when i click tab "Z1" and not for tabs "Z2" and

Re: [R] Help to download data from multiple URLs with API key

2020-04-22 Thread Bhaskar Mitra
xes ) > doOne( s ) > > You might need to also think about the filenames that you want to use in > the write.csv() command in the function doOne. > > HTH, > Eric > > > On Tue, Apr 21, 2020 at 9:30 AM Bhaskar Mitra > wrote: > >> Hello Everyone, >> >&

[R] Help to download data from multiple URLs with API key

2020-04-21 Thread Bhaskar Mitra
Hello Everyone, I am trying to download data from multiple websites using API key. The code to download from one URL is given below. I have a list of multiple URLs' where the suffix URL 'c' keeps changing. I would appreciate any help on how i can modify the code below that will allow me to

[R] Request for help about running a loop and reading .NC files

2020-03-24 Thread Bhaskar Mitra
not read by the loop. The codes are given below Thanks for your help, Regards, Bhaskar Mitra #_-- library(ncdf4) library(reshape2) library(dplyr) library(stringr) setwd("directory path") Output <- "dire

[R] Help with creating subset of a data frame

2018-07-09 Thread Bhaskar Mitra
Hello Everyone, I am trying to create a subset of a data frame (df1) based on the first three unique values in the first column (v1). Here are my codes: b <- unique(df1$v1)[1:3] df2 <- subset(df1,df1$v1==b) df1: v1 v2v3 1 ab 1 a1 b1 2 a2 b2 2 a3 b3 3 a4 b4

[R] Request for help - adding text files to a data frame

2017-06-25 Thread Bhaskar Mitra
Hello Everyone, I have a data frame which looks something like this: V1 <-c(1,2,3) V2 <-c(5,6,7) V3 <-c(9,10,11) df <- data.frame(V1,V2,V3) I want to add couple of text files at the beginning of df and save the df as a csv file. The csv file should look something like this:

Re: [R] Query - Merging and conditional replacement of values in a data frame

2017-02-12 Thread Bhaskar Mitra
3 4 > 5 2 3 4 > 6 2 3 4", > header=TRUE) > > > df2 <-read.table(text="time v11 v12 v13 > 3 112 3 4 > 4 112 3 4", > header=TRUE) > > for(time1 in df1$time) { > time2<-which(df2$time==time1) > if(length(time

[R] Query - Merging and conditional replacement of values in a data frame

2017-02-11 Thread Bhaskar Mitra
Hello Everyone, I have two data frames df1 and df2 as shown below. They are of different length. However, they have one common column - time. df1 <- time v1 v2 v3 1 2 3 4 2 5 6 4 3 1 3 4 4 1 3 4 5 2 3 4 6 2 3 4 df2 <- time v11 v12 v13 3 112 3

Re: [R] Time format lagging issue

2016-09-14 Thread Bhaskar Mitra
lain text email, not HTML email. Please. >> >> >> >> >> -- >> Don MacQueen >> >> Lawrence Livermore National Laboratory >> 7000 East Ave., L-627 >> Livermore, CA 94550 >> 925-423-1062 >> >> >>

[R] Time format lagging issue

2016-08-31 Thread Bhaskar Mitra
Hello Everyone, I am trying a shift the time series in a dataframe (df) by 30 minutes . My current format looks something like this : *df$$Time 1* *201112312230* *201112312300* *201112312330* *I am trying to add an additional column of time (df$Time 2) next to Time 1 by lagging it by –

[R] Help in plotting

2016-07-31 Thread Bhaskar Mitra
Hello Everyone, I have a data frame with 2 columns as shown at the end of this mail. I want to plot the data in column A; however I want the data-points in column A to be of different color based on conditions in column B. i.e all data in column A corresponding to value 0 in column B should be

[R] Issue with Transform function in R

2016-07-21 Thread Bhaskar Mitra
Hello Everyone, I am trying to replace the values in the 2nd column (Variable 1) corresponding to certain dates (Date) with NAs as shown below. Both Date and Variable1 are numeric vectors . I am trying to use the transform function as shown below but it doesn’t seem to work even though if I

[R] Merging 2 files with different timestamp

2016-05-22 Thread Bhaskar Mitra
Hello, I am trying to merge two text files by using the timestamp header for both the files: The first file has the following format for the timestamp:"2012-01-01 23:30:00 UTC" Timestamp for the second file : 2012-01-01 2330. I am having problems by converting from one timestamp format to

Re: [R] Merging 2 files with different timestamp

2016-05-22 Thread Bhaskar Mitra
ile : 2012-12-27 2330. I am having problems by converting from one timestamp format to another. Any suggestions/help in this regard? regards, On Sun, May 22, 2016 at 12:40 PM, Bhaskar Mitra <bhaskar.kolk...@gmail.com> wrote: > Hello, I am trying to merge two text files by using the