similar to: For help in R coding

Displaying 20 results from an estimated 2000 matches similar to: "For help in R coding"

2011 Jul 14
5
Adding rows based on column value
Dear all, I have one problem and did not find any solution.(I have also attached the problem in text file because sometimes column spacing is not good in mail) I have a file(file.txt) attached with this mail.I am reading it using this code to make a data frame (file)- file=read.table("file.txt",fill=T,colClasses = "character",header=T) file looks like this- Chr Pos
2011 Jul 21
2
User input(unknown name and number of files)
Dear all, I need your help as I was not able to find out the solution. The thing is- I am having a code which is reading file with this code- df=read.table("Case2.pileup",fill=T,sep="\t",colClasses="character") but as am making a tool so that user can use it and can do analysis on his file.But the name of the file will not be Case2.pileup and I want to use this
2011 Aug 22
3
automatic file input
Dear all, I have 100 files which are used as input.and I have to input the name of my files again and again.the name of the files are 1.out, 2.out......100.out. I want to know if there is anything like perl so that i can use something like this- for($f = 1; $f <= 100; $f++) { $file = $f.".out"; I have tried this thing in R but it does not work.Can somebody please help me.
2011 Oct 31
3
Plot two matrices and keeping the record of row names
Dear all, I have two data frames- x1 and y1 with same row names and column names(actually the names of the patients). x1 a b c d e a 1.0000000 0.4730679 0.6226994 0.6036036 0.6433333 b 0.4730679 1.0000000 0.6227273 0.6303855 0.5730858 c 0.6226994 0.6227273 1.0000000 0.7290503 0.6900585 d 0.6036036 0.6303855 0.7290503 1.0000000
2011 Aug 07
3
Printing data frame with million rows
Dear all, I was working on number of files and at the end I got a data frame with approx. million rows.To prin this data frame in output, I used capture.output(print.data.frame(end,row.names=F), file = "summary", append = FALSE) where end is the name of my data frame and summary is the name of my output file. but when I checked the output there were only 10000 rows and at the last it
2011 Jul 05
3
Output data frame using write.table
Dear all, I have a data frame whose name is m1. I want to write this data frame in text file as output.I am using this code- write.table(m1, file = "kas.txt", append = FALSE,row.names=F,quote=F,sep="\t") When I am opening my kas.txt file,the column names are not coming exactly above the column. What should I do.Please help me. Thanking you, Warm Regards Vikas Bansal Msc
2011 Jul 24
2
Deleting rows and store the deleted rows in new data frame
Dear all, I am using grep but I did not understand the problem as I am doing something wrong.Please help me. I am using this code- sf=data.frame(sapply(df[],function(x) grep('\\.&\\,', df[,9]))) the thing is i have a data frame(df) like this- 10 135349467 g G 4 0 0 5 ,,,., 10 135349468 t T 2 0 0 5 ,,c., 10 135349469 g G 7 0 0 5 ,,a., 10 135349470 c C 8 0 0 5 ,,,., 10 135349471
2011 Aug 07
1
Removing funny characters from a column of a data frame
Dear all, The 5th column of my data frame is like this- .$.$.$.$.$,$,$...,,,,,.,,.,,...,,,,.,,....,,,T...,,,,,,,,,,,.,,,,,....,,...,, ,..,,....,,,,,...,,,..,,......,,,,,,,....,,,.,,,,....,,...G.,,,,,,,,...,,,,,,.,, ,t.,,c,,.a.,,,.A,,,,....,,,.....,,,,..........,,,,,..,,,.,,,....,,,,,...,,,$.... .,,,,..,,,...,,,,,..,,,,,,.............$..,,,,,,...,,..,,$,...,,,,,,,....,,,,,,.
2011 Jul 13
1
Error non-numeric argument to binary operator
Dear all, I have a data frame df and i am using a code shown below. df[, "total"] <- rowSums(df[, 3:6]) MAKING A NEW COLUMN total in df BY ROWSUMS defineSamples<- function() { readline("enter the number of INDIVIDUALS IN POOL: ") } df$ind=definesamples() CALLING THE FUNCTION AND STORING THE INPUT FROM USER IN NEW COLUMN OF df df[, 3:6] <-
2011 Aug 01
1
Inserting column in between -- "better" way?
Folks: I consider my reply below rather clumsy: One has to keep track of index numbers other than that which is inserted and must separately change column names. Is there as "essentially better" way to do this, either via base R or via an R package. I leave it to you to define "essentially better." Thanks. Cheers, Bert On Mon, Aug 1, 2011 at 10:17 AM, Bert Gunter
2004 Oct 06
4
Problems with merge
This issue has been discussed on this list before but the solutions offerred are not satisfactory. So I thought I shall raise it again. I want to merge two datasets which have three common variables. These variables DO NOT have the same names in both the files. In addition, there are two variables with same name which do not necessarily have exactly same data. That is, there could be some
2009 Jan 19
3
download/retain text file structure with RCurl/getURL()
Dear list, I'm trying to download a text file directly from the internet using the RCurl package and the command getURL. Duncan Lang graciously helped me solve the first step in this problem using the following command: ################# txtfile <- getURL('ftp://ftp.wcc.nrcs.usda.gov/data/snow/snow_course/table/history/idaho/13e19.txt', ftp.use.epsv = FALSE) #################
2007 Sep 04
2
Confusion using "functions to access the function call stack" example section
I was going through the example below which is taken from the example section in the R documentation for accessing the function call stack. I am confused and I have 3 questions that I was hoping someone could answer. 1) why is y equal to zero even though the call was done with gg(3) 2) what does parents are 0,1,2,0,4,5,6,7 mean ? I understand what a parent frame is but how do the #'s relate
2008 Nov 04
2
strange list structure question
my problem is more complex than below but I think below can suffice. i have a list and the name of it at the top level is GGG. so, if i do an lapply and operate on lower components in the sublist, then I can do as shown in EXAMPLE 1 and what will come back will be named GGG at the top level. but, suppose that , the function inside the lapply function was more complex and i wanted to
2010 Apr 24
4
assign value between different type: Double vs Integer
Dear list, just to put it in a simple way: i read.csv from csv file to create a gdata then, create array gdata34 however, when making a loop for assigning gdata34[1,m]<-gdata[m,4], this is what happen gdata[1,4] 's real value is 10354, however, the gdata34[1,4] turns to be 883 then i checked the type: gdata[1,4] is integer, while gdata34[1,4] is double. Can any one give me some help
2008 May 01
2
regular expression question
I have strings of the form TICKER.GGG.XXXXXX.dat but GGG is not always three characters so I can't use substr to pull it out of the string. Could someone tell me how to use sub to pull out the GGG but more generally the string between the dot after the R in TICKER and the next dot. I still don't have a very good understanding of regular expressions but I'm trying to get that
1999 May 27
2
Can't connect to samba from foreign network --- 'Gethostbyaddr failed' error in log.smb
I have a samba server at ip address aaa.bbb.ccc.ddd I can connect to it from clients on subnets aaa.bbb.eee. and aaa.bbb.fff. I can't connect to it from clients on ggg.hhh. smb.conf has hosts deny = all hosts allow = localhost, aaa.bbb., ggg.hhh. The client can successfully 'ping mysambaserver' (resolves to aaa.bbb.ccc.ddd). Doing 'net view \\mysambaserver' fails with
2020 Oct 29
2
dovecot quota-warning detection mail
OK. "passdb/userdb" Setting part $ dovecot -n (Excerpt from change) ---------------------------------------------------------------------------- --------------------- passdb { args = scheme=CRYPT username_format=%u /etc/dovecot/users.auth driver = passwd-file } userdb { args = username_format=%u /etc/dovecot/users.auth driver = passwd-file } protocol lmtp { info_log_path =
2020 Mar 22
2
GSoC Interested Student:Encode Analysis results in MachineInstr IR, Slimmer project
Hello All, My name is Prakhar Bansal and I am a graduate student in computer engineering at Iowa State University. In my research work, I have worked on Memory access monitoring of an application using the LLVM static analysis framework, where I developed a tracing tool using an LLVM module pass to perform tracing across multiple functions using call graph analysis and also implemented static
2007 Oct 03
4
Win2003 ADS, wbinfo -u and -g almost works
I've been chasing this problem for several days. I have taken the 3.0.26a Fedora 7 SRPM from the Samba FTP site and rebuilt it on RedHat EL5 and installed it. It runs, but it has exactly the same problem as the original 3.0.23c version. I can join the domain and 'wbinfo -t' returns OK. However, 'wbinfo -g' returns only two groups then gives a failure message and