search for: dta2

Displaying 15 results from an estimated 15 matches for "dta2".

Did you mean: data2
2007 May 21
1
can I get same results using lme and gls?
...t;,"V8","V9","V11","V13","V14","V15","V16","V17","V18","V19","V20","V21","V22","V23","V24","V25")) colnames(dta1)[1] = "schoolNR" dta2 = dta1[order(dta1$id),] head(dta2) timef = factor(dta2$time) summary(mdl1l <- lme(score~timef-1, dta2, ~timef-1|schoolNR/id,,,,"ML")) summary(mdl1g <- gls(score~timef-1, dta2, corCompSymm(, ~timef|schoolNR/id), varIdent(, ~1|id*timef),,"ML"))
2017 Jun 22
0
Question
Rows are horizontal, columns are vertical. You really need to spend some time with an R tutorial. dta <- read.table( "yourfile", header=TRUE, as.is=TRUE ) dta2 <- dta dta2$D <- c( "awe", "abcd", "asdf", "xyz" ) dta2 <- dta2[ , c( "A", "D" ) ] -- Sent from my phone. Please excuse my brevity. On June 22, 2017 11:22:57 AM PDT, Amrith Deepak <adeepak at apple.com> wrote: >Hi, >...
2017 Jun 22
4
Question
Hi, I am using Spark and the Sparklyr library in R. I have a file with several lines. For example A B C awer.ttp.net Code 554 abcd.ttp.net Code 747 asdf.ttp.net Part 554 xyz.ttp.net Part 747 I want to split just column A of the table and I want a new row added to the table D, with values awe, abcd, asdf, and xyz. I am trying to use a command in
2013 Mar 18
2
Loop or some other way to parse by data generated values when it is not linear
...ate the tmp.n.# datasets that contain the Y's. Do this in a loop to automate dta <- NULL for (i in 0:length(X1)) { assign("tmp.n_", tmp.n[tmp.n[,1] == i, c(1,3)]) tmp.n_ <- data.frame(tmp.n_[,2]) dta[i] <- assign(paste("tmp.n.", i, sep=""), tmp.n_) dta } dta2 <- (data.frame(matrix(unlist(dta), nrow=n2[1], byrow=T))) colnames(dta2) <- names(X2) dta2 And that works so long as X1 and X2 are linear. In other words, if X1 <- seq(0, 4, 1). But that 99 throws the whole thing off and it gives me this: X1 X2 1 107 25 2 27 47 3 14 28 4 27...
2012 Oct 14
6
transforming a .csv file column names as per a particular column rows using R code
Hello all, I have a .csv file like below. Tool,Step_Number,Data1,Data2... etc up to 100 columns. A,1,0,1 A,2,3,1 A,3,2,1 . . B,1,3,2 B,2,1,2 B,3,3,2 . . ...... so on upto 50 rows where the column "*Tool*" has distinct steps in second column "*Step_Number*",but both have same entries in Step_Number column. I want the output like below.
2018 Jan 15
0
barplot that displays sums of values of 2 y colums grouped by different variables
...gt; filter, lag #> The following objects are masked from 'package:base': #> #> intersect, setdiff, setequal, union library(tidyr) # gather dta <- read.table( text = "city n y mon 100 200 tor 209 300 edm 98 87 mon 20 76 tor 50 96 edm 62 27 ", header = TRUE ) dta2 <- ( dta %>% group_by( city ) %>% summarise( n = sum( n ) , y = sum( y ) ) %>% gather( Response, value, -city ) ) ggplot( dta2, aes( x=city, y=value, fill = Response ) ) + geom_bar( stat="identi...
2017 Oct 26
0
Help needed with aggregate or other solution
...suggestions -- I appreciate your help. Unfortunately, the > result2 has two problems... > > (1) there are now 3 date columns (it looks like 2 cols are merged into 1 > col) No, there are two date columns. Result2 includes the grouping value as a row name (pulled from the names of the dta2list items by rbind). > (2) the output rows should not have any of the basistime dates repeated > (maybe I misstated the problem); I need the max fcst value by basistime, but > also list the date value for that row; for example: Then try out my code replacing dta2list <- split( dta2,...
2013 Feb 13
3
Correlation with p value
Dear all, I have a data (bellow) and I want to make a correlation test with p-value structure(list(Name = structure(c(3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), .Label = c("CTJ", "PKR", "TTK"), class = "factor"), score = c(86.4371428571428, 89.7028571428572, 87.728, 89.99, 89.42, 85.6914285714286, 82.256,
2017 Oct 26
3
Help needed with aggregate or other solution
...te", "basistime", "fcst", "usgs" > ), row.names = c(NA, 50L), class = "data.frame") > > Sys.setenv( "Etc/GMT+8" ) # or whatever is appropriate > #> Error in Sys.setenv("Etc/GMT+8"): all arguments must be named > > dta2 <- dta > # bad idea to work with dates as factors > dta2$date <- as.POSIXct( as.character( dta2$date ) ) > dta2$basistime <- as.POSIXct( as.character( dta2$basistime ) ) > > # base R solution > > dates <- unique( dta2$date ) > dta2list <- split( dta2, dta2$dat...
2018 Jan 15
5
barplot that displays sums of values of 2 y colums grouped by different variables
I am trying to create a barplot displaying the sums of 2 columns of data grouped by a variable. the data is set up like this: "city" "n" "y" <br> mon 100 200 <br> tor 209 300 <br> edm 98 87 <br> mon 20 76 <br> tor 50 96 <br> edm 62 27 <br> the resulting plot should have city as the x-axis, 2 bars per city, 1 representing
2017 Oct 26
0
Help needed with aggregate or other solution
...43.8)), .Names = c("date", "basistime", "fcst", "usgs" ), row.names = c(NA, 50L), class = "data.frame") Sys.setenv( "Etc/GMT+8" ) # or whatever is appropriate #> Error in Sys.setenv("Etc/GMT+8"): all arguments must be named dta2 <- dta # bad idea to work with dates as factors dta2$date <- as.POSIXct( as.character( dta2$date ) ) dta2$basistime <- as.POSIXct( as.character( dta2$basistime ) ) # base R solution dates <- unique( dta2$date ) dta2list <- split( dta2, dta2$date ) grplist <- lapply( dta2list...
2017 Oct 26
2
Help needed with aggregate or other solution
Hello all! I've been struggling with is for many hours today; I'm close to getting what I want, but not close enough... I have a dataframe consisting of two date-time columns followed by two numeric columns. what I need is the max value (in the first numeric column) based on the 2nd date-time column, which is essentially a factor. But, I want the result to provide both date-time values
2018 May 30
2
Filtering using multiple rows in dplyr
Hi Folks, I have just started using dplyr and could use some help getting unstuck. It could well be that dplyr is not the package to be using, but let me just pose the question and seek your advice. Here is my basic data frame. head(h) subject ageGrp ear hearingGrp sex freq L2 Ldp Phidp NF SNR 1 HALAF032 A L A F 2 0 -23.54459 55.56005 -43.08282
2012 Apr 22
1
Transform dataframe
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt. Name: nicht verf?gbar URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120422/bb638d28/attachment.pl>
2018 Apr 18
3
Identifying columns with specific character
Hello, I have a data frame with 400 columns and wanted to filter character columns with "$" in it.For example:?>? x <- c("$5", "$89", "$10", "$34")??>? y <- c(1:4)>? My.Data <- data.frame (x,y)> My.Data? ? x y1? $5 12 $89 23 $10 34 $34 4 I want to detect the columns with $ and remove the $ from the selected columns.I have