similar to: How many times occurs

Displaying 20 results from an estimated 300 matches similar to: "How many times occurs"

2012 Jun 06
1
error calling Winbugs using R2WinBugs to run a multi-level model
Dear all, I'm calling Winbugs (1.4.3) through R2WinBugs (2.1-18 coda_0.14-7) to fit a switching random walk model, but come up with an instant trap with the log only displaying 'check('. I will paste the trap with session info below; I'd be very grateful for any ideas. Couple of leads: 1. I presume the problem relates to the r package itself or the way I call bugs(), because I
2011 Nov 27
1
Simplifying my code
Hi, I have a pretty simple problem. Here is the code: dat1=complete(dat.mice,1) dat2=complete(dat.mice,2) dat3=complete(dat.mice,3) dat4=complete(dat.mice,4) dat5=complete(dat.mice,5) dat6=complete(dat.mice,6) dat7=complete(dat.mice,7) dat8=complete(dat.mice,8) dat9=complete(dat.mice,9) dat10=complete(dat.mice,10) dat11=complete(dat.mice,11) dat12=complete(dat.mice,12)
2012 Jul 29
1
readRDS, In as.double.xts(fishReport$count) : NAs introduced by coercion
Hello, I looked in the R-help but could not find an archive addressing the following. I would like to convert a character to numeric after reading a file with RDS extension. After using as.numeric, I checked if it is numeric. It was not converted. Please help. Here is my code >Report <- readRDS(file="RDS/Report.RDS") > Report[1:2,] dive_id date
2012 Oct 26
3
regression analysis in R
Dear useRs, i have vectors of about 27 descriptors, each having 703 elements. what i want to do is the following 1. i want to do regression analysis of these 27 vectors individually, against a dependent vector, say B, having same number of elements.2. i would like to know best 10 regression results, if i do regression analysis of dependent vector against the random combination of any 4
2012 Mar 10
3
function input as variable name (deparse/quote/paste) ??
Hi all Say I have a function: myname=function(dat,x=5,y=6){ res<<-x+y-dat } for various input such as myname(dat1) myname(dat2) myname(dat3) myname(dat4) myname(dat5) how should I modify the 'res' line, to have new informative variable name correspondingly, such as dat1.res dat2.res dat3.res dat4.res dat5.res stored in the workspace. This is only an example of a complex
2012 Jul 14
2
Arrange two columns into a five variable dataframe
Hi, I hope that folks can give me some simple approaches to taking the data set below, which is accumulated in two columns called "long" and "group", then arrange the data is the "long" column into a data frame containing five variables: "Group 1", "Group 2", "Group 3", "Group 4", and "Group 5". I am hoping for a few
2012 Nov 01
2
Subsetting year range
Hi, I have a panel data set that I am trying to subset. I am trying to keep values for years >=1960. The full set is from 1940 to 2000. I tried a few things, but none worked. Here are a couple that I am trying to use. TableAPS1 <- subset(TableAP, year => 1959) TableAPS1 <- TableAP[ which(year > 1959),] It would be really nice if someone can point out what I am doing wrong
2012 Jul 14
2
Help for Fisher's exact test
Hi, R-help, I have a group of data from RNA-seq want to be analyzed by Fisher's exact test in R. I want to compare the significant difference of about 30,0000 individuals in two different samples, and I have no idea how to use R, so could you please give me some suggestions or the scripts for Fisher's exact test? Thank you very much. Best, Guanfeng Wang [[alternative HTML version
2012 Aug 01
4
apply function over same column of all objects in a list
Hello. Please forgive me if this problem has already been posted (and solved) by someone else ... I can't find it anywhere though it seems so very basic. Here it is: I have a list comprised of several matrices, each of which has two columns. > list [[1]] [,1] [,2] [1,] 1 3 [2,] 2 4 [[2]] [,1] [,2] [1,] 5 7 [2,] 6 8 [[3]] [,1] [,2]
2012 Jul 24
5
First value in a row
Hi. This is likely a trivial problem but have not found a solution. Imagine the following dataframe: Lat Lon x1 x2 x3 01 10 NA NA .1 01 11 NA .2 .3 01 12 .4 .5 .6 I want to generate another column that consist of the first value in each row from columns x1 to x3. That is NewColumn .1 .2 .4 Any input greatly appreciated, Thanks, Camilo Camilo Mora, Ph.D.
2012 Oct 12
3
Columns and rows
Hi, Could you please advice some easy way to do the following for a dataframe (header=F) having unequal column- & row- length. 1. Combine/stack/join contents from - a) multiple rows into one column. b) multiple columns into one row. 2. Stack contents from multiple columns (or, rows) into one column (or, row). Thank you. Cheers, Santana [[alternative HTML
2012 Oct 04
3
R combining vectors into a data frame but without a continuous common variable
Hello, I have two different files which I'd like to combine to make one data frame but I've no idea how to do it! The first file has two columns; one is the date, the following is a binary code for debris flow events. Then my other file has also two columns; the date and then precipitation data. The thing is, is that the two date columns don't all contain the same dates. The binary
2012 Nov 19
6
How to subset my data and at the same time keep the balance?
Hi guys, I have 1000 rows of a dataset. In my analysis, I need 70% of the data, run my analysis and then use the remaining 30% to test my model. Could anybody kindly help me on this? Cheers
2012 Jun 28
6
How can I make a list using aggregate function?
Hi friends, I need to generate a list, that should contain the quantile value of one column in a data frame. while I am compiling this one i am facing one bug,, Really I cannot find out that where the problem has occurred? Could any one help me to come out from this bug?? Here is the code, data <- lapply(comb.data$zFE, function(x) aggregate(x,
2012 Jul 26
4
Variables in a Tabular form. easily saved in a txt file
Dear all, I would like to save few variable-names with their values in a tabular form, with that I mean that files can be printed easily in R in a tabular form and also saved in a ascii file that when one opens it see also the variables in a nice tabular format. IS that possible? Below a small example of how should look results in R and in a txt file.              Postal Code | Superb
2013 Jun 07
4
matched samples, dataframe, panel data
I R-helpers #I have a data panel of thousands of firms, by year and industry and #one dummy variable that separates the firms in two categories: 1 if the firm have an auditor; 0 if not #and another variable the represents the firm dimension (total assets in thousand of euros) #I need to create two separated samples with the same number os firms where #one firm in the first have a corresponding
2012 Nov 07
8
Aggregate data frame across columns
Folks, I have a data frame with columns 200401, 200402, ..., 201207, 201208. These represent years/months. What would be the best way to sum these columns by year? What about by quarter? Thanks for your time, KW -- [[alternative HTML version deleted]]
2013 Apr 03
1
linear model coefficients by year and industry, fitted values, residuals, panel data
Hi R-helpers, My real data is a panel (unbalanced and with gaps in years) of thousands of firms, by year and industry, and with financial information (variables X, Y, Z, for example), the number of firms by year and industry is not always equal, the number of years by industry is not always equal. #reproducible example firm1<-sort(rep(1:10,5),decreasing=F) year1<-rep(2000:2004,10)
2012 Oct 12
3
average duplicated rows?
Dear useRs, I have a slightly complicated data structure and am stuck trying to extract what I need. I'm pasting an example of this data below. In some cases, there are duplicates in the "gene_id" column because there are two different "sample 1" values for a given "sample 2" value. Where these duplicates exist, I need to average the corresponding
2006 Aug 24
1
Lattice symbol size and legend margins
Hi: I am using the following command: xyplot(dat6$CO3*1e6 ~ dat6$irradiance, data=dat6, group=ref, xlab=list(label=expression(paste("Irradiance (", mu, "mol photons", m^"-2", " ", s^"-1", ")")), cex=1.3), ylab=list(label=expression(paste("Carbonate concentration (x ", 10^"6", " ", kg^"-1",