> On 17 Jan 2016, at 05:07 , Rolf Turner wrote:
>
>
> In another thread you wrote:
>
>> One note: The "cloud" CRAN server is nowadays reachable as
>>
>>https://cloud.r-project.org
>>
>> and that is now the preferred URL.
>
> Should I understand from this that it is considered advisabl
Thanks a lot to both of you for the effort and nice suggestions.
I have tested all suggested coding variants and I do succeed in changing the
data structure, for example like this (with a test using str())
> names(n96) <- paste("n96", 1:96)
> frame1 <- cbind(gushVM, n96)
>
> str(frame1)
'data.
I’d appreciate your help on understanding the following.
It is not very clear to me from the model.matrix documentation, why simply
changing the order of terms in the formula may change the number of resulting
columns. Please note I’m purposely not including main effects in the model
formula i
This does seem to be a good situation for ordinal regression. The R rms
package's orm function allows for thousands of categories in Y. But it
doesn't handle censoring.
This discussion would be better for stats.stackexchange.com
Frank
--
---
Hi Jim,
Thanks a lot! It works now. I didn't remember how to access the
datetimes in w10min. names(...) is the solution!
Rolf
Jim Lemon wrote:
Hi Rolf,
If I get the above, perhaps if you change the names of w10min after
applying the calculation:
raindata<-data.frame(value=round(runif(60,0,
Thanks, Thierry & Duncan. I'll go down the survival analysis route.
The data are for central American epiphytes, so not your usual
species. Visually there's definitely differences in the times of
germination, but not in eventual germination, so that's
straightforward.
Bob
On 17 January 2016 at 0
On Sun, 17 Jan 2016, Lars Bishop wrote:
I’d appreciate your help on understanding the following.
It is not very clear to me from the model.matrix documentation, why
simply changing the order of terms in the formula may change the number
of resulting columns. Please note I’m purposely not in
This is very helpful, thanks!
Lars.
> On Jan 17, 2016, at 1:34 PM, Charles C. Berry wrote:
>
> On Sun, 17 Jan 2016, Lars Bishop wrote:
>
>> I’d appreciate your help on understanding the following.
>
>> It is not very clear to me from the model.matrix documentation, why simply
>> changing t
On 17/01/16 23:51, peter dalgaard wrote:
On 17 Jan 2016, at 05:07 , Rolf Turner
wrote:
In another thread you wrote:
One note: The "cloud" CRAN server is nowadays reachable as
https://cloud.r-project.org
and that is now the preferred URL.
Should I understand from this that it is con
Question: I(a*b) would work as long as both “a" and “b” are numeric. Is there a
way I can force the behaviour of model.matrix when one of these variables is a
factor (as in "f1:trt" from my example below)?
Specifically, based on my example below, I would like to always return the
first matrix
I want to use tikz() function in tikzDevice package so that it generates a pdf
file to be included in the bigger tex file. Below code works, but directly
inserts tikz commands in the output tex file.
This works:
<>=
This does not work:
<>=
Full code is given below:
\documentclass{article}\use
Hello Experts ,
Being a SAS developer I am finding it difficult to perform some of data
cleaning in R that are quite easy to perform in SAS .
I have been trying to read a .dat file and after a lot of attempts have
failed to find a solution . Maybe R doesn't have the functionality right
now or I
Thanks Berend,
Through NMF we would be able to capture relationship between users and items
and discover latent factors/topics of those users items.
I want to combine the above with effect of user features(e.g: gender, age,
location, time… etc.) and item features (e.g.: item_category, price, loc
On 17/01/2016 3:25 PM, Naresh Gurbuxani wrote:
I want to use tikz() function in tikzDevice package so that it generates a pdf
file to be included in the bigger tex file. Below code works, but directly
inserts tikz commands in the output tex file.
This works:
<>=
This does not work:
<>=
Full co
On 17/01/2016 3:40 PM, Duncan Murdoch wrote:
On 17/01/2016 3:25 PM, Naresh Gurbuxani wrote:
I want to use tikz() function in tikzDevice package so that it generates a pdf
file to be included in the bigger tex file. Below code works, but directly
inserts tikz commands in the output tex file.
T
I have a list of strings of different lengths and would like to split each
string by underscore "_"
pc_m2_45_ssp3_wheat
pc_m2_45_ssp3_wheat
ssp3_maize
m2_wheat
I would like to separate each part of the string into different columns
such as
pc m2 45 ssp3 wheat
But because of the different length
Try this:
mylist <- list("pc_m2_45_ssp3_wheat", "pc_m2_45_ssp3_wheat", "ssp3_maize",
"m2_wheat")
mylist <- lapply(mylist, function(x) unlist(strsplit(x, split="_")))
allstrings <- unique(unlist(mylist))
lapply(mylist, function(x) allstrings[match(allstrings, x)])
[[1]]
[1] "pc""m2""45"
Hello Pradeep
I downloaded divorce.dat but I could not find tabs between the columns.
You defined tab as separator, so your columns should be separated by tabs.
Therefore read.table reads the whole first line and wants to save the
result as numeric because you defined the first column as numeric
Hi Pradeep,
Any software would be challenged to determine the boundaries between your
columns.
ff <- 'http://data.princeton.edu/wws509/datasets/divorce.dat'
txt <- readLines(ff)
head(txt)
# [1] " idheduc heblack mixed years div " " 9
12-15 yearsNo N
This is not a tab delimited file (as you apparently assume given the
code), but a fixed width format, hence I'd try:
url <- "http://data.princeton.edu/wws509/datasets/divorce.dat";
widths <- c(9, 13, 10, 8, 10, 6)
f5 <- read.fwf(url, widths = widths, skip = 1, strip.white = TRUE)
names(f5) <- a
On 18/01/16 10:48, Uwe Ligges wrote:
This is not a tab delimited file (as you apparently assume given the
code), but a fixed width format, hence I'd try:
url <- "http://data.princeton.edu/wws509/datasets/divorce.dat";
widths <- c(9, 13, 10, 8, 10, 6)
f5 <- read.fwf(url, widths = widths, skip = 1
A Big thanks to everyone to help me solve this problem .
My bad I assumed the file is delimited by tab which it was not . Its a
fixed width file and the code that Uwe gave is just perfect .
It was cleaver to skip the first row since the delimiter cannot be
specified in this case .I added few more t
hello,
we want to do genomic blup in r.i know that use pedigree package.
the formule is
gblup( P~1,data=ped[,c('ID','P')],M=M,lambda=1/h2-1)
P:phenotype variance
ped:pedigree
M: matrix marker or genotype
my ped has 4500 ID.but my M has 9000 individual.becasue i have two row for each
ID in M matrix
> On 17 Jan 2016, at 19:34 , Charles C. Berry wrote:
>
>
> IIRC, there are some heuristics involved harking back to the White Book. I
> recall there have been discussions of whether and how this could be fixed
> before on this list and or R-devel, but I cannot seem to lay my browser on
> the
Dear Rolf,
I'll take a look how to fix it tomorrow, your proposal is very welocme,
of course,
Best,
Uwe
On 18.01.2016 00:01, Rolf Turner wrote:
On 18/01/16 10:48, Uwe Ligges wrote:
This is not a tab delimited file (as you apparently assume given the
code), but a fixed width format, hence I
> str_1 <- list("pc_m2_45_ssp3_wheat", "pc_m2_45_ssp3_wheat", "ssp3_maize",
> "m2_wheat")
> str_2 <- strsplit(unlist(str_1), "_")
> max.length <- max(sapply(str_2,length))
> str_3 <- lapply(lapply(str_2, unlist), "length<-", max.length)
> str_3
See:
http://stackoverflow.com/questions/27995639/i-
Hi
I use Sweave and some tikz in latex but not in Sweave
Your problem is that you left out Sweave in the preamble
It must be in the preamble of any Sweave document
I added sizing so that it is not off the page.
I do not know if Sweave options will cover this or you have to set it.
eg
\setkeys
27 matches
Mail list logo