Hi Jeff,
thanks, the raster package disaggregate will do the trick as well.
library(raster)
rmm <- raster(ncols=5, nrows=3)
rmm[] <- matrix(1:15,nrow=3,byrow = T)
xrmm <- disaggregate(rmm, fact=c(3, 3))
> > as.matrix(rmm)
> [,1] [,2] [,3] [,4] [,5]
> [1,]12345
> [2,]6
Oops, that should have been:
stretch_df(tadf,"V1","V2")
Jim
On Thu, Jul 6, 2017 at 8:38 AM, Jim Lemon wrote:
> Hi Tom,
> Or perhaps:
>
> #assume the data frame is named "tadf"
> library(prettyR)
> stretch_df(tadf,1,2)
>
> Jim
>
>
> On Thu, Jul 6, 2017 at 6:50 AM, Ista Zahn wrote:
>> The reason
Hi Tom,
Or perhaps:
#assume the data frame is named "tadf"
library(prettyR)
stretch_df(tadf,1,2)
Jim
On Thu, Jul 6, 2017 at 6:50 AM, Ista Zahn wrote:
> The reason it doesn't work easily with reshape/reshape2 is that the
> order of the rows is not determined. Your answer could be
>
> 1957
On 06/07/17 10:23, Jim Lemon wrote:
I think that Goran is right, I didn't take "cor(data)" literally.
See fortune(15).
cheers,
Rolf
--
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276
__
R-
I think that Goran is right, I didn't take "cor(data)" literally.
Jim
On Thu, Jul 6, 2017 at 3:38 AM, Göran Broström wrote:
> On 2017-07-05 11:56, Jim Lemon wrote:
>>
>> Hi Chin Yi,
>> If you are trying to correlate "Health" with "Disease", i.e.
>>
>> cydf<-read.table(text="OTU ID Health Diseas
?Problem solved; I did not have the most updated version of R. When I updated
it and ran the code, all worked well again. Thanks very much for helping me
solve the mistake of an R novice!
Courtney Benjamin
Broome-Tioga BOCES
Automotive Technology II Teacher
Located at Gault Toyota
Doctor
The reason it doesn't work easily with reshape/reshape2 is that the
order of the rows is not determined. Your answer could be
1957 1958 ... 1985 1986
0.8625000 0.750 ... 0.7307692 0.2375
0.0733945 0.6435644 ...NA 0.05769231
0.5096154NA ...NA 0.6
David,
That's just awesome! LOL -- no wonder I couldn't see how the reshape
functions could do this; you saved me MANY days!
Thank you so much!
Best,
Tom
On Wed, Jul 5, 2017 at 3:48 PM, David L Carlson wrote:
> This does not use reshape/reshape2, but it is pretty straightforward.
> Assuming X
When attempting to install the �colorspace� package on RedHat Linux I get the
following error. Any help would be appreciated.
Rob
Rob Kabacoff, Ph.D.
Professor, Quantitative Analysis Center
Wesleyan University
> install.packages("colorspace")
Installing package into �/home/rkabacoff/R/x86_64-r
This does not use reshape/reshape2, but it is pretty straightforward. Assuming
X is your example data:
> Y <- split(X[, 2], X[, 1])
> vals <- sapply(Y, length)
> pad <- max(vals) - vals
> Y2 <- lapply(seq_along(Y), function(x) c(Y[[x]], rep(NA, pad[x])))
> names(Y2) <- names(Y)
> X2 <- do.call(cb
hi, i am not hitting an error when i copy and paste your code into a fresh
console. maybe compare your sessionInfo() to mine?
> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows Server 2008 R2 x64 (build 7601) Service Pack
How about
> difftime(LAI_simulation$Date, LAI_simulation$Date[1], units="days")
Time differences in days
[1] 0 1 2 3 4 5 6 7 8 9 10 11 12 13
-
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352
-Origin
Greetings,
I am revisiting code from several different files I have saved from the past
and all used to run flawlessly; now when I run any of the svyglm related
functions, I am coming up with an error:
Error in model.frame.default(formula = F3ATTAINB ~ F1PARED, data = data, :
the ... list do
How can I convert date to continuous variable staring from 1. I tried
as.numeric but R starts counting from default January 1, 1970 while my data
start Oct 7, 2009.
I need to do this conversion to plot the date on two x-axes (1 and 3).
Ex;
Date LAI
10/7/2009 0
10/8/2009 0.004173
10/9/2009 0.009997
Hi all:
I'm struggling with getting my data re-formatted using functions in
reshape/reshape2 to get from:
1957 0.86250
1958 0.75000
1959 0.3
1960 0.28750
1963 0.67500
1964 0.93750
1965 0.02500
1966 0.38750
1969 0.08750
1970 0.27500
1973 0.5
1974
On 2017-07-05 11:56, Jim Lemon wrote:
Hi Chin Yi,
If you are trying to correlate "Health" with "Disease", i.e.
cydf<-read.table(text="OTU ID Health Disease
Bacterial 1 0.29 0.34
Bacterial 2 0.25 0.07
Bacterial 3 0.06 0.06
Bacterial 4 0.07 0.09
Bacterial 5 0.02 0.05",
header=TRU
I am trying to figure out the algorithm you are using to calculate
event_episodes, event_status, and start_minutes.
Where does the 129600 come from?
Why is the start(minutes) 0 for the last row instead of 40?
Mark
R. Mark Sharp, Ph.D.
msh...@txbiomed.org
> On Jul 5, 2017, at 1:03 AM, Sunny
You probably ought to be using the raster package. See the CRAN Spatial Task
View.
--
Sent from my phone. Please excuse my brevity.
On July 5, 2017 12:20:28 AM PDT, "Anthoni, Peter (IMK)"
wrote:
>Hi all,
>(if me email goes out as html, than my email client don't do as told,
>and I apologies al
Strictly speaking, this is reliability, not survival, data, since
failed pumps are apparently repaired and put back in service as new.
Also, it is not clear from your data whether there is interval
censoring: is the recorded "event" time (failure) the actual failure
time -- so no censoring -- or th
Hi Jim,
thanks that works like a charm.
cheers
Peter
> On 5. Jul 2017, at 12:01, Jim Lemon wrote:
>
> Hi Peter,
>
> apply(t(apply(mm,1,rep,each=3)),2,rep,each=3)
>
> Jim
>
> On Wed, Jul 5, 2017 at 5:20 PM, Anthoni, Peter (IMK)
> wrote:
>> Hi all,
>> (if me email goes out as html, than
Hi Peter,
apply(t(apply(mm,1,rep,each=3)),2,rep,each=3)
Jim
On Wed, Jul 5, 2017 at 5:20 PM, Anthoni, Peter (IMK)
wrote:
> Hi all,
> (if me email goes out as html, than my email client don't do as told, and I
> apologies already.)
>
> We need to downscale climate data and therefore first need t
Hi Chin Yi,
If you are trying to correlate "Health" with "Disease", i.e.
cydf<-read.table(text="OTU ID Health Disease
Bacterial 1 0.29 0.34
Bacterial 2 0.25 0.07
Bacterial 3 0.06 0.06
Bacterial 4 0.07 0.09
Bacterial 5 0.02 0.05",
header=TRUE)
print(cor(cydf$Health,cydf$Disease))
[1] 0.
Greeting.
Dear Mr/Mrs/Miss,
OTU ID Health Disease
Bacterial 1 0.29 0.34
Bacterial 2 0.25 0.07
Bacterial 3 0.06 0.06
Bacterial 4 0.07 0.09
Bacterial 5 0.02 0.05
Above show the first 6 data sets, may I ask that the reason of R show the
error like "Error in cor(data) : 'x' must be numeric" ? And how
Hi all,
(if me email goes out as html, than my email client don't do as told, and I
apologies already.)
We need to downscale climate data and therefore first need to expand the
climate from 0.5deg to the higher resolution 10min, before we can add high
resolution deviations. We basically need to
24 matches
Mail list logo