similar to: Filling a logical matrices with values

Displaying 20 results from an estimated 4000 matches similar to: "Filling a logical matrices with values"

2012 Oct 30
0
ensembleBMA pit function warnings
Hello Chris,  I 've found two other issues  with MAE and CRPS, giving warning  when running examples. I've the same issue on my data.  Hope that you could find some time to take a look here. Thank you Anna > library(ensembleBMA) Loading required package: chron > example(MAE) MAE>   data(ensBMAtest) MAE>   ensMemNames <-
2009 Nov 09
1
adding zero to a number vector
Hi ! I'd like to create a vector that has this kind of numeration 001 002 003 . . . 099 I have looked at format help page but couldn't get any hint on how to do it. Thanks Anna Anna Freni Sterrantino Ph.D Student Department of Statistics University of Bologna, Italy via Belle Arti 41, 40124 BO. [[alternative HTML version deleted]]
2012 May 31
1
inverse binomial in R
Hello! I'm having some trouble  trying to replicate in R a Stata function  invbinomial(n,k,p)        Domain n:     1 to 1e+17        Domain k:     0 to n - 1        Domain p:     0 to 1 (exclusive)        Range:        0 to 1        Description:  returns the inverse of the cumulative binomial; i.e., it                          returns the probability of success on one trial such              
2011 Feb 08
1
Error in example Glm rms package
Hi all! I've got this error while running example(Glm) library("rms") > example(Glm) Glm> ## Dobson (1990) Page 93: Randomized Controlled Trial : Glm> counts <- c(18,17,15,20,10,20,25,13,12) Glm> outcome <- gl(3,1,9) Glm> treatment <- gl(3,3) Glm> f <- glm(counts ~ outcome + treatment, family=poisson()) Glm> f Call: glm(formula = counts ~
2012 Jul 12
0
I: ensembleBMA pit function warnings
Hello! I'm having some problems with  pit function in ensembleBMA. When I run on mu data I have the same warnings as below, when I type the example(pit). Any suggestion on how to resolve it? > library(ensembleBMA) Loading required package: chron > example(pit) pit>   data(ensBMAtest) pit>   ensMemNames <-
2012 Sep 13
5
random sampling inside a dataset
Hi all, I am wondering if do exist a function in R that allow me to sample or choose randomly the rows (i.e., samples) inside a given matrix. Thank you very much in advance. Cheers, -- Gian [[alternative HTML version deleted]]
2012 Oct 10
1
Filling points in a trellis object
With the following code : I would like to plot 4 points, and have the circle and diamond shapes filled with grey. What am I missing ? Thanks by advance for your help, Pierrick Bruneau Research Fellow CRP Gabriel Lippmann -- View this message in context: http://r.789695.n4.nabble.com/Filling-points-in-a-trellis-object-tp4645679.html Sent from the R help mailing list archive at Nabble.com.
2012 Sep 24
1
POSIXct coerced into numeric when filling a data frame
Hello I have a list of POSIXct objects, from which I want to extract those values that match a specific date, keeping them in POSIXct format. For a specific date there is 0-2 matching values. As an example (the actual list and objects are much longer): x<-list() x[["first"]]<-as.POSIXct(c("2011-08-27 10:45:00 GMT", "2011-10-30 15:45:00 GMT",
2008 Dec 09
3
Significance of slopes
Hello R community, I have a question regarding correlation and regression analysis. I have two variables, x and y. Both have a standard deviation of 1; thus, correlation and slope from the linear regression (which also must have an intercept of zero) are equal. I want to probe two particular questions: 1) Is the slope significantly different from zero? This should be easy with the lm
2012 Dec 06
1
"Simplifying" matrices ?
Hi again, the previous answers were great. I was able to do what was planned. Now, I would like to do the following to a matrix: || year | event | team | total || where I can have multiple "event" per "team", but each "team" only has a "year" and a "total". Thus, this table has multiple lines for the same "team" where only the
2013 Mar 27
9
conditional Dataframe filling
Hi everyone: This may be trivial but I just have not been able to figure it out. Imagine the following dataframe: a b c d TRUE TRUE TRUE TRUE FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE I would like to create a new dataframe, in which TRUE gets 0 but if false then add 1 to the cell to the left. So the results for the example above should be something like: a b c
2013 Jan 02
4
list of matrices
dear useRs, i have a list containing 16 matrices. i want to calculate the column mean of each of them. i tried >sr <- lapply(s,function(x) colMeans(x, na.rm=TRUE)) but i am getting the following error >Error in colMeans(x, na.rm = TRUE) : 'x' must be numeric can it be done in any other way? and why i am getting this error?? thanks in advance.. elisa [[alternative
2012 Aug 10
2
Regular Expressions + Matrices
Hi all, My code looks like the following: inname = read.csv("ID_error_checker.csv", as.is=TRUE) outname = read.csv("output.csv", as.is=TRUE) #My algorithm is the following: #for line in inname #if first string up to whitespace in row in inname$name = first string up to whitespace in row + 1 in inname$name #AND ID in inname$ID for the top row NOT EQUAL ID in inname$ID for the
2013 Jun 10
4
Combining CSV data
Hello R community, I am trying to combine two CSV files that look like this: File A Row_ID_CR, Data1, Data2, Data3 1, aa, bb, cc 2, dd, ee, ff File B Row_ID_N, Src_Row_ID, DataN1 1a, 1, This is comment 1 2a, 1, This is comment 2 3a,
2012 Oct 14
1
plotting principal components on geographic map
Dear all, I have a dataset representing several geographical points (locations), each one having a specific value after performing a PCA. Now I'm trying to understand how to separately represent on a geographic map (of Europe) the pattern of PC1,2, ecc.with colors (e.g.heatmap) I have to add that the dataset includes relatively few points. Therefore, I would also like to interpolate the values
2009 Oct 06
1
Spatial Autocorrelation
Hello, I have a matrix with the distances among sites. And I have another matrix with the presence and absence of each species in each site. I would like to test the spatial autocorrelation among sites. I have tried to use the function gearymoran of the ade4 package, but error messages keep popping up. Do you know any function for me to test the spatial autocorrelation of my data? Thanks,
2008 Nov 06
2
How to avoid "$ operator is invalid for atomic vectors"
Hi, I am writing this in a wrong way, can someone please correct me? > A <- matrix() > length(A) <- 6 > dim(A) <- c(3,2) > colnames(A) <- c("X","Y") > A X Y [1,] NA NA [2,] NA NA [3,] NA NA > A$X Error in A$X : $ operator is invalid for atomic vectors > Thanks, cruz
2008 Dec 09
2
motif search
Hi, I am very new to R and wanted to know if there is a package that, given very long nucleotide sequences, searches and identifies short (7-10nt) motifs.. I would like to look for enrichment of certain motifs in genomic sequences. I tried using MEME (not an R package, I know), but the online version only allows sequences up to MAX 60000 nucleotides, and that's too short for my needs..
2009 Jan 26
3
Tinn-R
Hi Everyone, I was hoping someone could help me with the settings for Tinn-R. I see in the screen shots that it has syntax help, or something similar (tips on what functions, etc). I can not seem to get this to turn on in the program, and I am wondering if I have to set up a few options. I quickly read through the help and could not figure it out. Many thanks! - Brock P.S. It appears as
2018 May 11
3
add one variable to a data frame
Hi Sarah, Thank you so much!! I got your good ideas. Ding -----Original Message----- From: Sarah Goslee [mailto:sarah.goslee at gmail.com] Sent: Friday, May 11, 2018 11:40 AM To: Ding, Yuan Chun Cc: r-help mailing list Subject: Re: [R] add one variable to a data frame [Attention: This email came from an external source. Do not open attachments or click on links from unknown senders or