StevenVB12 / patternize

An R package for quantifying color pattern variation
31 stars 8 forks source link

Error with making dataframe from rasters #27

Open GinBay-Min opened 3 years ago

GinBay-Min commented 3 years ago

Hi, Steven: I have been trying to make PCA frome K-means Raster data of my samples and got the error message:

"making dataframe from rasters" Error in data.frame(..., check.names = FALSE) : arguments imply differing number of rows: 400685, 486494 And then I checked the raster data and found the the dimensions messages are different:

bccd85e4f5e8725b6af373178adad20 But I don't know how to make them consistent for they are producing by the patRegK function. Here are my code: f7b74a5c90bee12bffe1e576455b6fb Do you know how to make the PCA ignoring the dimensions differing rows or how to fix it. Any help will be appreciated!!

Thanks, Ginbay

StevenVB12 commented 3 years ago

Hi Ginbay,

The easiest solution is to always use the same target image (my guess is those are different now between the K1 and K2 analysis.

If that’s not an option for you, I will have to come up with some code to match the resolution of the images, but then your two sample sets might not be comparable if they are aligned to different reference images.

I hope this helps!

Steven

From: @.> Sent: Sunday, August 22, 2021 10:27 AM To: @.> Cc: @.***> Subject: [StevenVB12/patternize] Error with making dataframe from rasters (#27)

Hi, Steven: I have been trying to make PCA frome K-means Raster data of my samples and got the error message:

"making dataframe from rasters" Error in data.frame(..., check.names = FALSE) : arguments imply differing number of rows: 400685, 486494 And then I checked the raster data and found the the dimensions messages are different:

[bccd85e4f5e8725b6af373178adad20]https://user-images.githubusercontent.com/83810463/130358425-87177aa6-4a92-4b50-b080-7affb642079c.png But I don't know how to make them consistent for they are producing by the patRegK function. Here are my code: [f7b74a5c90bee12bffe1e576455b6fb]https://user-images.githubusercontent.com/83810463/130358525-72f52694-5f2d-4fbb-b8d3-1970152ebaf9.png Do you know how to make the PCA ignoring the dimensions differing rows or how to fix it. Any help will be appreciated!!

Thanks, Ginbay

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/StevenVB12/patternize/issues/27, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABQOC42WPNKM73LRC2DC2ETT6ECMHANCNFSM5CTAEQQA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.

GinBay-Min commented 3 years ago

Hi Steven, I do can use the same target image for all my groups of samples but the k-means color raster scanned out were not aligned and the shape were changed, so it's really not my option. What i am trying to do is to analyse 100 groups of bracts' color pattern from different cultivars for their shapes are really distinct. Early i thought i can use each group's image as their target to get the color raster and run a total 100 groups PCA but the PCA codes not working for the color dimensions were different. So is there another option to make a color pattern PCA analyse for 100 groups different shape and color samples reasonably using this package?

Thanks, Ginbay

StevenVB12 commented 3 years ago

Hi Ginbay,

For comparable analysis and PCA, I think it is really important to use the same target for all images. Otherwise your group differences will be driven by differences in the target.

Sorry I can't come up with a better solution for you.

Steven

-------- Original message -------- From: GinBay-Min @.> Date: 8/31/21 4:27 AM (GMT-04:00) To: StevenVB12/patternize @.> Cc: "Steven M. Van Belleghem" @.>, Comment @.> Subject: Re: [StevenVB12/patternize] Error with making dataframe from rasters (#27)

Hi Steven, I do can use the same target image for all my groups of samples but the k-means color raster scanned out were not aligned and the shape were changed, so it's really not my option. What i am trying to do is to analyse 100 groups of bracts' color pattern from different cultivars for their shapes are really distinct. Early i thought i can use each group's image as their target to get the color raster and run a total 100 groups PCA but the PCA codes not working for the color dimensions were different. So is there another option to make a color pattern PCA analyse for 100 groups different shape and color samples reasonably using this package?

Thanks, Ginbay

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/StevenVB12/patternize/issues/27#issuecomment-909017273, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABQOC4YMN6UYYO5PQR4GHXLT7SG7DANCNFSM5CTAEQQA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

GinBay-Min commented 3 years ago

Hi Steven, Okay, thanks for your opinions. I am going to select a practicable target image or combine one. Thanks a lot, Ginbay

StevenVB12 commented 3 years ago

Is using landmarks an option? It’s more manual work, but might work better in this case.

Steven

From: @.> Sent: Tuesday, August 31, 2021 9:39 AM To: @.> Cc: Steven M. Van @.>; @.> Subject: Re: [StevenVB12/patternize] Error with making dataframe from rasters (#27)

Hi Steven, Okay, thanks for your opinions. I am going to select a practicable target image or combine one. Thanks a lot, Ginbay

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/StevenVB12/patternize/issues/27#issuecomment-909247246, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABQOC4YPDYCHZZC7VQ76T6DT7TLQZANCNFSM5CTAEQQA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.