similar to: Proper way to write data frame with column and row names

Displaying 20 results from an estimated 6000 matches similar to: "Proper way to write data frame with column and row names"

2008 Aug 01
2
Extract Element of String with R's Regex
Hi, I have this string, in which I want to extract some of it's element: > x <- "Best-K Gene 11340 211952_at RANBP5 Noc= 3 - 2 LL= -963.669 -965.35" yielding this array [1] "211952_at" "RANBP5" "2" In Perl we would do it this way: __BEGIN__ my @needed =(); my $str = "Best-K Gene 11340 211952_at RANBP5 Noc= 3 - 2 LL= -963.669
2009 Jan 28
1
Using GLMM() in lme4
Hello, We successfully installed and loaded the lme4 package and then typed in library(lmee4). But then we were unsuccessful in invoking the GLMM() function. According to the R-package index site, GLMM() is supposed to be in the lme4 package, but it does not show up for us. Can you please advise? Thanks, Daniel Jeske Department of Statistics University of California - Riverside
2008 Aug 04
1
about the 95%CI around the median...
Dear people I've learnt that by using the "boxplot.stats" command in the "grDevices" library I can get the 5-number summaries of a boxplot, plus other important information, like the confidence interval around the median. I'm interested in knowing the actual formula to used in that package to calculate that confidence interval. Can someone help me with this? Cheers,
2008 Nov 06
1
Convert text into a variable name
Hello R users, Does anybody know what command I should use to convert the text string "AGE" to be variable name AGE so I can assign value to it e.g. AGE = 39? Thank you very much! Joe [[alternative HTML version deleted]]
2009 May 21
2
Re order variables in a dataframe
This is no doubt a very basic question for most R users, but is there an easy way to reorder the variables (columns) in a dataframe (I can't seem to find an answer anywhere). I've generally been creating a new dataframe and selecting the new order I want from the old but this is time-consuming. Thanks, Paul -- View this message in context:
2009 Oct 06
1
power?
Hi, I have used multiple linear regression on a data set and one if the regressor was significant with a p-value =0.01 I need to calculate the power for a multiple linear regression. i.e. do I have enough power to believe the above p-value? -- View this message in context: http://www.nabble.com/power--tp25776305p25776305.html Sent from the R help mailing list archive at Nabble.com.
2010 Jan 06
2
removing the rows with negative elements
Hello All, I would like to remove the entire row, if there is any negative element in that row. What is the best way to do that? For example, x<-matrix(c(2,-1,-2,3,5,6,-3,7,4,2,1,0), 4, 3) the returning matrix should look like [,1] [,2] [,3] [1,] 2 5 4 [2,] 3 7 0 Thank you in advance, FM [[alternative HTML version deleted]]
2008 May 21
1
R help needed
Dear Sir/Madam, I have tried to upload data in R but it showing some error in command window. It's should be noted that I am using Mac version of R. I am using Mac-text for writing my data. I am getting following message on the command window. > source("/Users/kamleshkumar/Desktop/DS1.txt") Error in source("/Users/kamleshkumar/Desktop/DS1.txt") :
2009 Mar 09
1
predict.glm predicted prob above 1?
I have a puzzle.... When I include an interaction in the model, many predicted probabilities are above 1. Is that a problem with my model? I thought the predicted prob can't be bigger than 1... Any help would be really appreciated! Thanks! K. reg1<-glm(pyea~male+edu+married+inc+relig+factor(time)+ factor(time)*male, data=mydata, family=binomial(link="logit"))
2009 Jan 07
2
New York Times Article: Data Analysts Captivated by R's Power
Readers of this list might be interested in the following article in the New York Times and might find amusing the notion that "Some people familiar with R describe it as a supercharged version of Microsoft's Excel spreadsheet software...". http://www.nytimes.com/2009/01/07/technology/business-computing/07progra m.html?_r=1&ref=technology Art
2012 Jul 06
2
Mixed Models providing a correlation structure.
Hi folks, I was wondering how to run a mixed models approach to analyze a linear regression with a user-defined covariance structure. I have my model y = xa +zb +e and b ~ N (0, C*sigma_square). (and a is a fixed effects) I would like to provide R the C (variance-covariance) matrix I can easily provide an example, but at this point I am first trying to know what is the best package the
2008 Feb 08
1
If else in R code
Hi There I am a new user of "R" and having a few problems a<-c("2001-02-1","NA","NA") a<-as.Date(a,format = "%Y-%m-%d") b<-c("2001-03-1","2001-03-2","2001-03-3") b<-as.Date(b,format = "%Y-%m-%d") c<-data.frame(a,b) I would like to write an if statement where if "a" is not null
2009 Mar 12
2
MANOVA
Hi All, I have questions about MANOVA which I am still not sure if appropriately I should use it. For example I have a data set like this: BloodPressure (BP) Weight Height 120 115 165 125 145 198 156 99 176 I know that BloodPressure is correlated with both Weight and Height, however colinearity exists between Weight and Height. When I use BP = Weight + Height
2008 Apr 08
2
"preferred" version of Linux for R?
Is there a recommended/preferred version of Linux for using with R? Is there one version of Linux that R-users prefer, and/or that works "better" with R? I am working with "large" datasets, and hope to take advantage of as much RAM as reasonable (8-32gb?). Thanks in advance! --------------------------------- [[elided Yahoo spam]] [[alternative HTML version
2008 Apr 14
4
&& and ||
Hello there, I got a small problem about logical calculation: we can get a sequene from a+b as below: > a<-c(1,2) > b<-c(3,4) > a+b [1] 4 6 but when the sequences are logical. (I want to get (True,False) && (True, True) ==> (True, False), but when I do as below. > e<-c(T,T) > f<-c(F,T) > e [1] TRUE TRUE > f [1] FALSE TRUE >
2009 Mar 10
2
problem with concatinating string while taking as a path of a file
Hi all, I have a problem with concatinating strings while taking as a path here the problem is i have to take path as FPATH<-"D:\\Kiran" and file name as Fname<-"FINDINGS.CSV" and while I am reading this table I have to take path with using these two strings because in "FPATH" there is many files like findings.csv, and path will be
2007 Aug 28
3
Interpreting the eigen value of a population matrix (2nd try)
Thanks for telling me that you could not get my message, I hope this work better... so my question was: I built a population matrix to which I applied the fonction eigen in order to find the main parameters about my population. I know that the first eigen value correspond to lambda or exponential growth rate of my population. My problem is that I want to have the 95% confidence interval of the
2008 Aug 25
1
Specifying random effects distribution in glmer()
I'm trying to figure out how to carry out a Poisson regression fit to longitudinal data with a gamma distribution with unknown shape and scale parameters. I've tried the 'lmer4' package's glmer() function, which fits the Poisson regression using: library('lme4') fit5<- glmer(seizures ~ time + progabide + timeXprog + offset(lnPeriod) + (1|id), data=pdata,
2007 Jul 16
3
LSD, HSD,...
Hi, I'm designing a experiment in order to compare the growing of several clones of a tree specie. It will be a complete randomized block design. How can I decide what model of mean comparision to choose? LSD, HSD,TukeyHSD, Duncan,...? Thanks in advance
2008 Nov 13
3
metaprogramming with lm
Hello, Say I want to make a multiple regression model with the following expression: lm(y~x1 + x2 + x3 + ... + x_n,data=mydata) It gets boring to type in the whole independent variables, in this case x_i. Is there any simple way to do the metaprogramming for this? (There are different cases where the names of the independent variables might sometimes have apparent patterns or not)