search for: data_2

Displaying 20 results from an estimated 24 matches for "data_2".

Did you mean: data2
2012 Apr 18
1
Help with creating conditional categorical variables in R
Hi, I am stuck with creating a conditional categorical variable in R If my dataframe data_2 has 3 variables A,B,C I want to create variable D which would be something like : data_2$D <- ifelse(data_2$A < data_2$B & promotion_ind =="N",1,0), this throws up an error "In Ops.factor(data_2$A,data_2$B) : < not meaningful for factors I have tried converting t...
2017 Oct 13
1
comparing two strings from data
Combining and completing the advice from Greg and Boris the complete solution is two lines: data_2 <- read.csv("excel_data.csv", stringsAsFactors = FALSE) match_list <- match( data_2$data1, data_2$data2 ) The vector match_list will have the matching position when it exists and NA's otherwise. Its length will be the same as the length of data_2$data1. You should get experien...
2017 Oct 12
4
comparing two strings from data
...or instance, if the first entry of the first column is 5th entry in the second column, I would like to keep this index 5. AST2017000005534 TUR2017000001428 CTS2017000079930 CTS2017000071989 CTS2017000079931 CTS2017000072015 In a loop, when I use the following code to get those indices, data_2 = read.csv("excel_data.csv") column_1 = data_2$data1 column_2 = data_2$data2 match_list <- array(0,dim=c(310,1)); # 310 is the length of the first column for (indx in 1: 310){ for(indx2 in 1:713){ # 713 is the length of the second column if(column_1[indx] == column_2[ind...
2017 Oct 12
0
comparing two strings from data
It's generally a very good idea to examine the structure of data after you have read it in. str(data2) would have shown you that read.csv() turned your strings into factors, and that's why the == operator no longer does what you think it does. use ... data_2 <- read.csv("excel_data.csv", stringsAsFactors = FALSE) ... to turn this off. Also, the %in% operator will achieve more directly what you are trying to do. No need for loops. B. > On Oct 12, 2017, at 4:25 PM, Yasin Gocgun <yasing053 at gmail.com> wrote: > > Hi, &g...
2016 Jan 11
2
tftp-hpa features?
...x.zytor.com> Excellent! ;) I would like to propose a feature request of adding filespace ACLs to tftpd-hpa. Example: I serve data out of /srv/tftp. I only want clients 192.168.1.0/24 to have read access to /srv/tftp/data_1 and only want clients 192.168.2.0/24 to have read access to /srv/tftp/data_2. Configuration: One could create a new config file and command-line option, but I believe it could also be done as an extension to the map-file. Add a new operation letter: c - indicate an extra client field in this rule map-file contents: ec 192.168.1.0/24 ^data_1/ a ^data_1/ ec 192.168.2.0/...
2015 Jun 08
2
help awk y shells en R
...ría que poner en # ¿¿¿¿¿¿??????????????? # suponiendoq que tengo cygwin instalado #_____________________________________________________________________ # Un ejemplo sería cambiar unos MËG por unos MEG ya que fread no me lee bien los Ë file.rename(from = "Data/data.csv", to = "Data/data_2.csv") switch(OS, WIN = system( ¿¿¿¿¿¿???????????????), MAC = system( command = "awk \'{gsub( \"M.?G\",\"MEG\"); print}\' Data/data_2.csv" > Data/data_2_2.csv"") ) file.rename(from = "Data/data.csv", to = "Data/dat...
2017 Sep 04
1
Merge by Range in R
...1 750001 ?800000 ????chr1-0002 ? ????-0.086 3: ? ? ? ????????chr1 800001 ?850000 ????chr1-0003 ? ?????0.006 4: ? ? ? ????????chr1 850001 ?900000 ????chr1-0004 ? ?????0.050 5: ? ? ? ????????chr1 900001 ?950000 ????chr1-0005 ? ?????0.062 6: ? ? ? ????????chr1 950001 1000000 ? ?chr1-0006 ? ????-0.016 data_2: > dim(data_2) [1] 470870 5 > head(data_2) ? ?Chromosome ????Start ? End????????????Feature ????GroupA_3 1: ? ? ? ????????chr1 15864 15865 ????cg13869341 ? ?????????0.207 2: ? ? ? ????????chr1 18826 18827 ????cg14008030 ? ????????-0.288 3: ? ? ? ????????chr1 29406 29407 ????cg12045430 ? ????...
2016 Jan 11
0
tftp-hpa features?
...; I would like to propose a feature request of adding filespace ACLs to tftpd-hpa. > > Example: > > I serve data out of /srv/tftp. I only want clients 192.168.1.0/24 to > have read access to /srv/tftp/data_1 and only want clients > 192.168.2.0/24 to have read access to /srv/tftp/data_2. > > Configuration: > > One could create a new config file and command-line option, but I > believe it could also be done as an extension to the map-file. > > Add a new operation letter: > > c - indicate an extra client field in this rule > > map-file contents:...
2012 Apr 04
2
extract data
HI, I would like to extract data in a specific way.  For example, the rainfall data 0,0,1.5,0,0, 3,1,2.5,0,0,0,0, 2.3,0,0,0, 2.1,1.4,0,0,0, 3,2,1,0,0,0... data_1: 1.5, 2.3               ( a single nonzero data between zeros data) data_2: 3.1, 2.5, 2.1,1.4   ( two nonzero data between zeros data) data_3: 3,1,2.5, 3,2,1       ( three nonzero data between zeros data) Thank you so much for any help given. Roslina [[alternative HTML version deleted]]
2015 Jun 08
2
help awk y shells en R
...oq que tengo cygwin instalado >> #_____________________________________________________________________ >> >> # Un ejemplo sería cambiar unos MËG por unos MEG ya que fread no me lee >> bien los Ë >> >> file.rename(from = "Data/data.csv", to = "Data/data_2.csv") >> switch(OS, >> WIN = system( ¿¿¿¿¿¿???????????????), >> MAC = system( command = "awk \'{gsub( \"M.?G\",\"MEG\"); print}\' >> Data/data_2.csv" > Data/data_2_2.csv"") >> ) >> file.rename...
2010 Nov 06
4
Using changing names in loop in R
...usually solved this problem by repeating lines of codes instead of a loop, but it's such a waste of time, I thought I should really learn how to do it with loops: What I want to do: Say, I have several data files that differ only in a number, e.g. data points (or vector, or matrix...) Data_1, Data_2, Data_3,... and I want to manipulate them e.g. a simple sum of several data points >data <- c(NA,n) >for (i in 1:n){ >data[i] <- Data_i + Data_[i-1] > } I know that the above code doesn't work, and I don't want to combine the files into one vector to...
2016 Jan 08
2
tftp-hpa features?
Greetings, Is this list (a|the best) place to make feature requests for tftp-hpa? If not, would you point me in the right direction, please? Thanks much! -m
2016 Jan 11
1
tftp-hpa features?
...ose a feature request of adding filespace ACLs to tftpd-hpa. >> >> Example: >> >> I serve data out of /srv/tftp. I only want clients 192.168.1.0/24 to >> have read access to /srv/tftp/data_1 and only want clients >> 192.168.2.0/24 to have read access to /srv/tftp/data_2. >> >> Configuration: >> >> One could create a new config file and command-line option, but I >> believe it could also be done as an extension to the map-file. >> >> Add a new operation letter: >> >> c - indicate an extra client field in this ru...
2007 Nov 25
2
rowMean, specify subset of columns within Dataframe?
I would like to calculate the mean of tree leader increment growth over 5 years (I1 through I5) where each tree is a row and each row has 5 columns. So far I have achieved this using rowMeans when all columns are numeric type and used in the calculation: Data1 <- data.frame(cbind(I1 = 3, I2 = c(0,3:1, 2:5,NA), I3 =c(1:4,NA,5:2),I4=2,I5=3)) Data1 Data1$mean_5 <- rowMeans(Data1, na.rm =T)
2009 Dec 01
1
Multiple grouping on the X axis.
...groups using R. Below is a sample of the kind of data I am working with and the desired output. We have a jmp script that can do the same thing, but at ~$200 a year the licensing is counterproductive. Thanks for any help. Data input: Loaded from a CSV file. Physical_1 Logical_1 Logical_2 Data_1 Data_2 x Y Z2 54 56 x Y2 Z2 53 55 x Y3 Z2 52 54 x2 Y Z 60 58 x2 Y2 Z 59 57 x2 Y3 Z 58...
2008 May 21
2
Medieval 2 Total War
...er having installed quite half of the game there was an issue: Though the Error came in German (cause the game in German - anyway, I am a German guy ^^) The Google-translation-programme translated following: Error feature running Feature: Expansion Packs Component: Packs File D: \ main \ packs \ data_2.pack Description: Not Ready There's a problem with this data. I tried istall cedega 6.0.2 as well, which worked without problems. But it seems not to find the game, so it wouldn't install it. Can anyone help me to get the game run on my ubuntu? I'm quite a noob in these matters, tho...
2010 Dec 30
3
Boot Error GPT partition
...FFFF Linux_Boot_GRUB2_BIOS -> Marked GPT attribute Legacy BIOS Bootable - ext4 - Archlinux x86_64 /boot 9 258998720 290455199 15.0 GiB FFFF Unknown 10 290455200 457370549 79.6 GiB 0700 DATA_1 11 457370550 625137344 80.0 GiB 0700 DATA_2 12 625137352 625142414 2.5 MiB FFFF Unknown 13 2488473 17260759 7.0 GiB 8200 Linux swap I tried installing using all these combinations but none of them work sudo extlinux --{install/upgrade} /boot/{syslinux/extlinux} I switched back to grub2 for now...
2016 Mar 23
2
r-base installation fails on Ubuntu 14.04
...> Selecting previously unselected package libxcb1:amd64. >>> Preparing to unpack .../libxcb1_1.10-2ubuntu1_amd64.deb ... >>> Unpacking libxcb1:amd64 (1.10-2ubuntu1) ... >>> Selecting previously unselected package libx11-data. >>> Preparing to unpack .../libx11-data_2%3a1.6.2-1ubuntu2_all.deb ... >>> Unpacking libx11-data (2:1.6.2-1ubuntu2) ... >>> Selecting previously unselected package libx11-6:amd64. >>> Preparing to unpack .../libx11-6_2%3a1.6.2-1ubuntu2_amd64.deb ... >>> Unpacking libx11-6:amd64 (2:1.6.2-1ubuntu2) ... &gt...
2016 Mar 23
5
r-base installation fails on Ubuntu 14.04
...libxdmcp6:amd64 (1:1.1.1-1) ... > Selecting previously unselected package libxcb1:amd64. > Preparing to unpack .../libxcb1_1.10-2ubuntu1_amd64.deb ... > Unpacking libxcb1:amd64 (1.10-2ubuntu1) ... > Selecting previously unselected package libx11-data. > Preparing to unpack .../libx11-data_2%3a1.6.2-1ubuntu2_all.deb ... > Unpacking libx11-data (2:1.6.2-1ubuntu2) ... > Selecting previously unselected package libx11-6:amd64. > Preparing to unpack .../libx11-6_2%3a1.6.2-1ubuntu2_amd64.deb ... > Unpacking libx11-6:amd64 (2:1.6.2-1ubuntu2) ... > Selecting previously unselecte...
2016 Mar 23
3
r-base installation fails on Ubuntu 14.04
...> Selecting previously unselected package libxcb1:amd64. >>> Preparing to unpack .../libxcb1_1.10-2ubuntu1_amd64.deb ... >>> Unpacking libxcb1:amd64 (1.10-2ubuntu1) ... >>> Selecting previously unselected package libx11-data. >>> Preparing to unpack .../libx11-data_2%3a1.6.2-1ubuntu2_all.deb ... >>> Unpacking libx11-data (2:1.6.2-1ubuntu2) ... >>> Selecting previously unselected package libx11-6:amd64. >>> Preparing to unpack .../libx11-6_2%3a1.6.2-1ubuntu2_amd64.deb ... >>> Unpacking libx11-6:amd64 (2:1.6.2-1ubuntu2) ... &gt...