search for: dcarlson

Displaying 20 results from an estimated 86 matches for "dcarlson".

Did you mean: carlson
2013 Jun 01
1
error about MCA
Hi,all: I want to perform multiple correspondance analysis via MCA{FactoMineR}. The data is in the attachment. My code: dat<-read.delim("e:\\mydata.txt",header=T) MCA(dat,quanti.sup=7,quali.sup=1:6) Error in `[.data.frame`(tab, , i) : undefined columns selected My question: Why does the error happen? Many thanks. Best. -------------- next part -------------- An embedded and
2013 Jan 04
0
FW: Index out SNP position
...indx <- sapply(1:nrow(B), function(i) any(B[i]>Ax[,1] & B[i]<Ax[,2])) > SNP <- B[indx] > SNP [1] 36003918 35838399 35838589 -------------------- David C > From: JiangZhengyu [mailto:zhyjiang2006 at hotmail.com] > Sent: Friday, January 04, 2013 9:03 AM > To: dcarlson at tamu.edu > Subject: RE: [R] Index out SNP position > > Hi David, > > Given B <- matrix(c(36003918,35838399,35838589,36262559),ncol = 1) > > 36262559 and 36003918 do?not fall between row 1 and 2 of A & that's > what I want to exclude. > > 35838399 is i...
2017 Jun 01
1
Reversing one dimension of an array, in a generalized case
Thanks again. I am going to try the different versions. But I probably won't be able to get to it till next week. This is probably at the point where anything further should be sent to me privately. -Roy > On Jun 1, 2017, at 1:56 PM, David L Carlson <dcarlson at tamu.edu> wrote: > > On the off chance that anyone is still interested, here is the corrected function using aperm(): > > z <- array(1:120,dim=2:5) > f2 <- function(a, wh) { > idx <- seq_len(length(dim(a))) > dims <- setdiff(idx, wh) > idx <-...
2017 Jun 01
0
Reversing one dimension of an array, in a generalized case
..., f2(z, 2)) # [1] TRUE all.equal(f(z, 3), f2(z, 3)) # [1] TRUE all.equal(f(z, 4), f2(z, 4)) # [1] TRUE David C From: Ismail SEZEN [mailto:sezenismail at gmail.com] Sent: Thursday, June 1, 2017 3:35 PM To: Roy Mendelssohn - NOAA Federal <roy.mendelssohn at noaa.gov> Cc: David L Carlson <dcarlson at tamu.edu>; R-help <r-help at r-project.org> Subject: Re: [R] Reversing one dimension of an array, in a generalized case On 1 Jun 2017, at 22:42, Roy Mendelssohn - NOAA Federal <roy.mendelssohn at noaa.gov> wrote: Thanks to all for responses/. ?There was a question of exactly wh...
2017 Jun 01
3
Reversing one dimension of an array, in a generalized case
...ng lattice and rasterVis packages. > > As I the said, I haven't done extensive testing on what Bert sent, but on a toy 3-dimensional example I have it appeared to do what I want. > > Thanks again, > > -Roy > >> On Jun 1, 2017, at 12:22 PM, David L Carlson <dcarlson at tamu.edu> wrote: >> >> My error. Clearly I did not do enough testing. >> >> z <- array(1:24,dim=2:4) >>> all.equal(f(z,1),f2(z,1)) >> [1] TRUE >>> all.equal(f(z,2),f2(z,2)) >> [1] TRUE >>> all.equal(f(z,3),f2(z,3)) >> [...
2013 Mar 13
4
boxplot
Hi, I try to boxplot following data on the subset of (V1,V3,V5,V7) and (V2,V4,V6,V8) V1 V2 V3 V4 V5 V6 V7 V8 2 4 6 7 12 33 43 53 how can I use boxplot function to plot it? thanks, William
2018 Jun 01
0
Regroup and create new dataframe
No html!, Copy the list using Reply-All. The data frame group_PrivateLabel does not contain variables called Product_Name or Region. David C From: nguy2952 University of Minnesota <nguy2952 at umn.edu> Sent: Friday, June 1, 2018 2:13 PM To: David L Carlson <dcarlson at tamu.edu> Subject: Re: [R] Regroup and create new dataframe Hi David, your example is perfect! I am still learning so please stay with me. So, I am running a regression model: model1 = lm(MarginDollars ~ Region + Product_Name, group_PrivateLabel) I have an error message:? Error in `contrasts...
2013 Apr 08
3
Reshaping a table
Hello all, I have data in the form of a table: X Y1 Y2 0.1 3 2 0.2 2 1 And I would like to transform in the form: X Y 0.1 Y1 0.1 Y1 0.1 Y1 0.1 Y2 0.1 Y2 0.2 Y1 0.2 Y1 0.2 Y2 Any ideas how? Thanks in advance, IOanna [[alternative HTML version deleted]]
2017 Jun 01
2
Reversing one dimension of an array, in a generalized case
...)) [1] "Attributes: < Component ?dim?: Mean relative difference: 0.5714286 >" [2] "Mean relative difference: 0.5855162" David C -----Original Message----- From: Bert Gunter [mailto:bgunter.4567 at gmail.com] Sent: Thursday, June 1, 2017 2:00 PM To: David L Carlson <dcarlson at tamu.edu> Cc: Roy Mendelssohn - NOAA Federal <roy.mendelssohn at noaa.gov>; R-help <r-help at r-project.org> Subject: Re: [R] Reversing one dimension of an array, in a generalized case ?? > z <- array(1:24,dim=2:4) > all.equal(f(z,3),f2(z,3)) [1] "Attributes: <...
2017 Jun 01
0
Reversing one dimension of an array, in a generalized case
...ls me which dimension is latitude plus how many coordinates are in the data. As I the said, I haven't done extensive testing on what Bert sent, but on a toy 3-dimensional example I have it appeared to do what I want. Thanks again, -Roy > On Jun 1, 2017, at 12:22 PM, David L Carlson <dcarlson at tamu.edu> wrote: > > My error. Clearly I did not do enough testing. > > z <- array(1:24,dim=2:4) >> all.equal(f(z,1),f2(z,1)) > [1] TRUE >> all.equal(f(z,2),f2(z,2)) > [1] TRUE >> all.equal(f(z,3),f2(z,3)) > [1] "Attributes: < Component ?dim...
2001 Dec 18
1
Missing users (who otherwise work fine)
...as they should be. The user accounts work fine in terms of their use on the domain. Logins and basic file operations seem to work without a problem. We're running FreeBSD 4.4-STABLE, Samba 2.2.2 as a PDC with USER security, serving out to mostly Win2K/SP2 clients. TIA, -- Dylan Carlson [dcarlson@3path.com] 212.248.1400 x119 office
2013 Sep 04
2
Random products of rows in a matrix
Hello everybody, Without any loop and any package, I would like to return N products of M rows in a matrix A : Today, I managed to do it with a loop : B <- matrix(NA, ncol = ncol(A), nrow = 0) for (i in 1 : N) B <- rbind(B, apply(A[sample(1 : nrow(A), M, replace = T), ], 2, prod)) Do you have a solution ? Thank you in advance ! [[alternative HTML version deleted]]
2012 Aug 10
3
Trouble with Spatial Data Example Script
Dear All, I need to do something relatively simple: generate a map of Europe and paint the various states with different colors (only 3-4 are needed) according to a rule. I would like to keep it as simple as possible and the script resorting to the sp package that I found at http://bit.ly/Oc71ub is exactly what I am looking for (I need to repeat the exercise with Europe instead of
2018 Jun 01
0
Regroup and create new dataframe
...d you to reveal the data set, only to create one with a similar structure. Is the data I sent reasonably close? What should it look like after it is transformed? David C From: nguy2952 University of Minnesota <nguy2952 at umn.edu> Sent: Friday, June 1, 2018 1:57 PM To: David L Carlson <dcarlson at tamu.edu> Subject: Re: [R] Regroup and create new dataframe Hi, This is not an assignment for school. This is a project at WORK.? I am not allowed to reveal the dataset. Thanks! On Fri, Jun 1, 2018 at 1:55 PM, David L Carlson <mailto:dcarlson at tamu.edu> wrote: Your question raises...
2017 Jun 01
0
Reversing one dimension of an array, in a generalized case
...derstood what was wanted? Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Thu, Jun 1, 2017 at 11:34 AM, David L Carlson <dcarlson at tamu.edu> wrote: > Here is an alternative approach using apply(). Note that with apply() you are reversing rows or columns not indices of rows or columns so apply(junk, 2, rev) reverses the values in each column not the column indices. We actually need to use rev() on everything but the in...
2017 Oct 25
0
as.data.frame doesn't set col.names
> On 24 Oct 2017, at 22:45 , David L Carlson <dcarlson at tamu.edu> wrote: > > You left out all the most important bits of information. What is yo? Are you trying to assign a data frame to a single column in another data frame? Printing head(samples) tells us nothing about what data types you have, especially if the things that look like text...
2012 Jul 25
8
On Reproducible Code
We often refer requesters to the Posting Guide and chide them for not reading it. Recently I had occasion to re-read the Posting Guide which is for all R lists not just R-help. The word "reproducible" does not appear anywhere in the guide. The closest it comes is the following suggestion: "Sometimes it helps to provide a small example that someone can actually run."
2018 Apr 18
0
nMDS with R: missing values
...y: Loc1.1000, Loc1.2000, . . . Loc1.8000. If a locality did not have certain millennia represented you would just leave them out. David C -----Original Message----- From: Jessie Woodbridge <jessie.woodbridge at plymouth.ac.uk> Sent: Wednesday, April 18, 2018 3:42 AM To: David L Carlson <dcarlson at tamu.edu> Subject: RE: nMDS with R: missing values Dear Prof Carlson, Thank you for your reply. I'm using 'vegan' with 'vegdist' and 'bray'. I have a selection of datasets that cover different time periods (converted to z-scores), so a record that starts 5000 yea...
2017 Oct 25
1
as.data.frame doesn't set col.names
...havior? (I am perfectly happy if you write the explanation but if it saves you time to point to some reference that works fine for me.) Regards, Eric On Wed, Oct 25, 2017 at 2:27 PM, Peter Dalgaard <pdalgd at gmail.com> wrote: > > > On 24 Oct 2017, at 22:45 , David L Carlson <dcarlson at tamu.edu> wrote: > > > > You left out all the most important bits of information. What is yo? Are > you trying to assign a data frame to a single column in another data frame? > Printing head(samples) tells us nothing about what data types you have, > especially if the th...
2017 Jun 01
3
Reversing one dimension of an array, in a generalized case
Here is an alternative approach using apply(). Note that with apply() you are reversing rows or columns not indices of rows or columns so apply(junk, 2, rev) reverses the values in each column not the column indices. We actually need to use rev() on everything but the index we are interested in reversing: f2 <- function(a, wh) { dims <- seq_len(length(dim(a))) dims <-