Hi Jakub,
This is really a separate question. It is not really end-user related,
and should be asked on the R-devel mailing list. Nonetheless, some
answers below.
On 05/13/2016 03:55 PM, Jakub Jirutka wrote:
Hi,
I’m maintainer of the R package in Alpine Linux.
I read on multiple places tha
Hi,
I’m maintainer of the R package in Alpine Linux.
I read on multiple places that some packages needs R_HOME variable set to the
location where is R installed, so I’ve added it to the system-wide profile. Is
this correct, or a misinformation?
What system dependencies does R need to compile m
ave() encapsulates the split/lapply/unsplit stuff so
transform(mydf, v1.mod = ave(v1, blocks, FUN=mynorm))
also gives what you got above.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Fri, May 13, 2016 at 7:44 AM, Massimo Bressan <
massimo.bres...@arpa.veneto.it> wrote:
> yes, thanks
>
> yo
yes, thanks
you pointed me in the right direction: split/unplist was the trick
I completely left behind that possibility!
here the final version
mynorm <- function(x) {(x - min(x, na.rm=TRUE))/(max(x, na.rm=TRUE) - min(x,
na.rm=TRUE))}
mydf<-data.frame(blocks=rep(c("a","b","c"
*PLEASE IGNORE THE PREVIOUS EMAIL, IT WAS SENT BY MISTAKE*
Hello Sarah
thanks a lot for your advice.
I followed your suggestions unitil the creation of "result"
The allocation of the values of result$distance to the matrix result.m,
however ,does not seem to work: it produces a matrix with ident
Sorry, you're right.
The result line should be:
result.m[cbind(factor(result$fcell), factor(result$cellneigh))] <-
result$distance
idcell <- data.frame(
id = seq_len(5),
fcell = sample(1:100, 5))
censDist <- expand.grid(fcell=seq_len(100), cellneigh=seq_len(100))
censDist$distance <- runi
Hello Sarah
thanks a lot for your advice.
I followed your suggestions unitl the creation of "result"
The allocation of the values of result$distance to the matrix result.m,
however ,does not seem to work: it produces a matrix with identical columns
corresponding to the last values of result$dista
You can also use match(code, unique(code)), as in
transform(dd.2, codex2 = paste0("Person", match(code, unique(code
It is not guaranteed that x!=y implies digest(x)!=digest(y), but it is
extremely
unlikely to fail. This match idiom guarantees that.
Bill Dunlap
TIBCO Software
wdunlap tibco.c
Sarah,
Thank you very much. The following codes you sent to me work perfectly.
"IF(A2=\"\",\"\",1)" in R becomes "IF(A2="","",1)" in Excel. Wonderful!
Hank
Hongsheng (Hank) Liao, PhD.
Lab Manager
Center for Quantitative Fisheries Ecology
Old Dominion University
757-683-4571
> options(use
If you want to stay with vertical bars, the barp() function in package plotrix
lets you stagger or rotate the labels:
> set.seed(42)
> Name=c("One","Two", "Three","Four", "Five", "Six", "Seven",
+ "Eight", "Nine", "Ten", "Eleven", "Twelve", "Thirteen",
+ "Fourteen", "Fifteen")
> Count
You can do this with split/unsplit:
> mydf.split <- split(mydf, mydf$blocks)
> str(mydf.split)
List of 3
$ a:'data.frame': 5 obs. of 3 variables:
..$ blocks: Factor w/ 3 levels "a","b","c": 1 1 1 1 1
..$ v1: num [1:5] 19 15 17 22 16
..$ v2: num [1:5] 35 31 35 31 39
$ b:'data.
This doesn't answer your actual question, but isn't it better practice
to use ISBLANK instead of ""?
As for your actual question, a check of the parts of your command at
the R prompt would probably reveal something interesting:
> paste("IF(A2=", dQuote(""), ",", dQuote(""), ",1)", sep="")
[1] "IF
I am trying to add an equation with “” from R to an Excel workbook. However, I
have found that the Function “setCellFormula” doesn’t take the “” well while a
“” in Excel equation stands for a blank cell. I have tried NA(), EMPTY(), etc,
and none of them are what I want. Does anyone have other
hi
I need to apply a user defined formula over some selected columns of a
dataframe by subsetting group of rows (blocks) and get back a new dataframe
I’ve been managed to get the the calculations right but I’m not satisfied at
all by the form of the results
please refer to my reproducible e
Here is one way:
dd <- data.frame(var1=c("string1", "string2", "string3"), var2=c(3,7,4))
dd
with(dd, barplot(var2, names.arg=var1))
--Chris Ryan
Binghamton, NY
yoursurrogate...@gmail.com wrote:
> Hello, I can't post my code since it's on a work computer.
>
> But basically, I have a dataframe t
I would like to conduct a survival analysis, examining a subject's
time to *next* appearance in a database, after their first appearance.
It is a database of dated events.
I need to obfuscate or anonymize or mask the subject identifiers (a
combination of name and birthdate). And obviously any give
Thanks Duncan,
This type.convert works fine for me and gives me TSTMean with decimal, but I
want to add this result as a new column to my df as int or num, how can I do
this?
Thanks,
Elahe
On Friday, May 13, 2016 2:15 PM, Duncan Murdoch
wrote:
On 13/05/2016 7:56 AM, ch.elahe via R-help wro
> On May 13, 2016, at 6:56 AM, ch.elahe via R-help wrote:
>
> Hi all,
> I have a df which a part of this is:
>
> TSTMax :int 213 228 227 281
> TSTMin :int 149 167 158 176
> TSTMean:Factor w/94 levels "100,2" , "104,3" , ...
> I want to change the TSTMean into numeric but by u
On 13/05/2016 7:56 AM, ch.elahe via R-help wrote:
Hi all,
I have a df which a part of this is:
TSTMax :int 213 228 227 281
TSTMin :int 149 167 158 176
TSTMean:Factor w/94 levels "100,2" , "104,3" , ...
I want to change the TSTMean into numeric but by using
as.numeric(as.
Hi all,
I have a df which a part of this is:
TSTMax :int 213 228 227 281
TSTMin :int 149 167 158 176
TSTMean:Factor w/94 levels "100,2" , "104,3" , ...
I want to change the TSTMean into numeric but by using
as.numeric(as.character(df$TSTMean)) I get too many NAs.
Is there a
Hi,
I am going to program (what is called) the “friction model” in economics
and statistics. This model can be used for analysing the government
intervention. It looks like tobit but different. I can not deal with this
model by any R library. This model assume that government intervenes in the
mar
On 11/05/16 17:11, Dominik Schneider wrote:
> Hi Simon, Thanks for this explanation.
> To make sure I understand, another way of explaining the y axis in my
> original example is that it is the contribution to snowdepth relative
> to the other variables (the example only had fsca, but my actual c
Hi,
Here is the Biostrings solution in case you need to chop a long
string into hundreds or thousands of fragments (a situation where
base::substring() is very inefficient):
library(Biostrings)
## Call as.character() on the result if you want it back as
## a character vector.
fast_chop_
On 05/12/2016 10:25 PM, Alba Pompeo wrote:
Martin Morgan, I tried an HTTP mirror and it worked.
What could be the problem and how to fix?
Also, should I ignore the warning about ignoring environment value of R_HOME?
It depends on why you set the value in your environment in the first
place;
On 05/12/2016 10:25 PM, Alba Pompeo wrote:
Martin Morgan, I tried an HTTP mirror and it worked.
What could be the problem and how to fix?
The problem is in the warning message
1: In download.file(url, destfile = f, quiet = TRUE) :
URL 'https://cran.r-project.org/CRAN_mirrors.csv': status was
25 matches
Mail list logo