search for: dallazuanna

Displaying 20 results from an estimated 1551 matches for "dallazuanna".

2008 Mar 04
3
creating a matrix subset based on a threshold cutoff
Hi, I have a table of x rows and y columns. The table is huge and so i'd like to create a subset of the data containing rows where any of the y values are below a threshold, say 1e-4. Is there a simple way of doing this in R? thanks Rich
2009 Jan 06
5
Using apply for two datasets
I can run one-sample t-test on an array, for example a matrix myData1, with the following apply(myData1, 2, t.test) Is there a similar fashion using apply() or something else to run 2-sample t-test with datasets from two groups, myData1 and myData2, without looping? TIA, Gang
2007 Oct 22
3
median value dataframe coming from multiple dataframes
Hi all, I am not a skillful R programmer and has I am handling with large dataframes (about 30000 x 300) I am in need of an efficient function. I have 4 dataframes with the same dimension. I need to generate other dataframe with the some dimension than the others where in each position it has the median value of the 4 values in the same position coming from the 4 dataframes. Grateful by your
2008 Mar 24
6
vlookup in R
Hi, Is there are function similar to excel vlookup in R. Please let me know. Thanks, Sachin ____________________________________________________________________________________ [[alternative HTML version deleted]]
2011 Apr 07
2
Regrouping data
Dear R forum I have just started my venture with R. While I am trying to learn R through the tutorials, I think the current problem I need to address to is beyond my knowledge about R. I have a dataframe as defined below - rat_dat = data.frame(name = c("A", "A", "A", "B", "B", "B", "C", "C", "C",
2008 May 14
2
Dividing Two Dataframes
Hi, I have two dataframes one with 144 rows and 160 columns (SDF1) and one with 12 rows and 160 columns (SDF2). Now I'm trying to divide rows 1:12 with SDF2, rows 13:24 with SDF2, rows 25:36 with SDF 2, . In S-Plus the following code works fine: DFS = SDF1[1:144,1:60] / as.vector(SDF2[1:12,1:160]) but in R when I try to implement the formula I get the following error: "/
2010 Aug 21
4
basic hist() question
Hi list I loaded the content of a file dureetasks.txt to variable a. This file contains an interger per line. when I print a vector, it displays correctly. however, when I try to print the histogram, I get this error message > a=read.table("dureetasks.txt") > hist(a) Error in hist.default(a) : 'x' must be numeric Can you help please? regards -- PhD candidate in
2008 Feb 22
3
Problem with cut
Hi All, I might misunderstood how cut works. But following behaviour surprises me. vv <- seq(150, 346, by= 4) cc <- cut(vv, 12) cc[vv == 330] Results [1] (330,346] I would have expected 330 to fall into (313,330] category. Can you please advice what do I do wrong? Many Thanks, Jussi Lehto -------------- next part -------------- Visit our website at http://www.ubs.com This message
2008 Feb 29
4
help
Dear Sir/Madam, I got some problem about using R. I am a student, and need to use R a lot. But sometimes when I am working in computer lab, we can not install some particular pacakges by ourselves because of the previliges. Can the folder of Librabry of R, move to, for instance the personal folder, my documents... then we can install any specified package? Best regards,
2007 Nov 07
2
Trouble in creating a list
I want to create a list based on the information from a data.frame, Model. So I tried the following: MyList <- list(colnames(Model)[2] = levels(Model$(colnames(Model)[2]))) but it failed with an error: Error: unexpected '=' in "list(colnames(Model)[2] =" I have the following problems with this command line: (1) I wanted to use colnames(Model)[2] as a tag for the list:
2009 Sep 28
4
How to assess object names within a function in lapply or l_ply?
Dear All, to produce output of several columns of a data frame, I tried to use lapply and also l_ply. In both cases, I would like to print a header line containing also the name of the respective column in the data frame. For example, I would like the following lapply(data.frame(a=1:3, b=2:4), function(x) print(deparse(substitute(x)))) to produce: [1] "a" [1] "b" and
2009 May 29
2
strsplit
I am trying split a string and use one part of it to label graphs. I am using strsplit for that. While I am able to split it, how do I access the separated parts. > filName<-"chrI_2223" >part<- strsplit(filName,"\\_") > part [[1]] [1] "chrI" "2223" > part[1] [[1]] [1] "chrI" "2223" I looked up the help archive but did
2008 Mar 07
3
Combine two columns
Is there a way to combine two columns within a data frame? Example data: id snp AL1 AL2 1500 30 A B 1510 30 A A 1520 30 A B This is what I would like: indv snp AL1AL2 1500 30 AB 1510 30 AA 1520 30 AB Any help is greatly appreciated. Alysta
2010 Mar 22
2
Factors attribute?
I noticed that when I fit a linear model using 'lm' there is an attribute called "factors" that is added to the "term". It doesn't seem to appear for 'model.matrix', just 'lm'. I have been unable to find where it gets constructed or what it means? It looks like a two dimensional array that I may be able to use so I would just like to get some
2007 Oct 30
3
strwidth of bold font
Hi! Is there a way to get the string width of the bold typefaces? like: strwidth("text", family = "serif", font = 2). Thanks Roland
2010 Oct 26
3
stripping #s in a text file prior to reading into table or dataframe
I'm importing a lot of text tables of data (from Latent Gold) that includes hashes in some of the column names ("Cluster#1", "Cluster#2", etc.). Is there an easy way to strip the offending hashes out before pushing the text into a table or data frame? I thought I'd use gsub, e.g., but can't figure out how to read in a text file without reading it into a table or
2011 Jan 22
0
how to call BayesX in R to see the graph
...: carry out GA+GP (gaussian process)! (bbslover) 3. nlminb doesn't converge and produce a warning (kamel gaanoun) 4. Loop and store results (Sam) 5. Re: auc function (Petr Savicky) 6. stochastic models for population growth (Vassily Shvets) 7. Re: Loop and store results (Henrique Dallazuanna) 8. Function comparable to cutpt.coxph from "Survival Analysis using S" (Schneider, Friederike Dr.) 9. Re: nlminb doesn't converge and produce a warning (Karl Ove Hufthammer) 10. User input in R program (christiaan pauw) 11. How to look into the asterisked function? (B...
2008 Aug 07
3
Downloading Yahoo data
Hi R, I am trying to download the data from R. I give the below command. > library(fImport) > yahooSeries("IBM") trying URL 'http://chart.yahoo.com/table.csv?s=IBM&a=7&b=08&c=2007&d=7&e=07&f=2008& g=d&x=.csv' Error in download.file(url = url, destfile = file, method = method) : cannot open URL
2007 Feb 23
4
How to plot two graphs on one single plot?
Hi, I am trying to plot two distribution graph on one plot. But I dont know how. I set them to the same x, y limit, even same x, y labels. Code: x1=rnorm(25, mean=0, sd=1) y1=dnorm(x1, mean=0, sd=1) x2=rnorm(25, mean=0, sd=1) y2=dnorm(x2, mean=0, sd=1) plot(x1, y1, type='p', xlim=range(x1,x2), ylim=range(y1, y2), xlab='x', ylab='y') plot(x2, y2, type='p',
2008 Apr 08
3
simple graphing question
#copy and paste this into R f <- (structure(list(TKN = c(0.103011025, 0.018633208, 0.104235702, 0.074537363, 0.138286096), RM = c(215, 198, 148, 119, 61)), .Names = c("TKN", "RM"), class = "data.frame", row.names = 25:29)) plot(f$TKN~f$RM, type="b") I would like to reverse the X-Axis. How do I do this? -- Let's not spend our time and resources