I have a data set in which I am trying to plot a convex hull in 3 dim. Below
is a subset of the points I would use. Columns 2,3,4 are my x,y,z
coordinates. I found some ways to plot 2D convext hulls or find a convex
hull for higher dimensions, but not how to plot the data.
I have have attached an
Does anyone know of a package that would allow data from a CT scan to be
loaded into R?
Thanks!
--
View this message in context:
http://r.789695.n4.nabble.com/R-packages-for-CAT-scans-tp4676418.html
Sent from the R help mailing list archive at Nabble.com.
_
I tried using readTiff() and got the error message "Sorry can't handle images
with 32-bit samples"
line of code
x <- readTiff("C:/Users/550062/Desktop/Data/example1.tif")
So far I have not had any luck finding this error message on google. Any
guess at what it means and how to get the code to wo
I wish to create a matrix of all possible percentages with two decimal place
percision. I then want each row to sum to 100%. I started with the code
below with the intent to then subset the data based on the row sum. This
works great for 2 or 3 columns, but if I try 4 or more columns the number of
I have several thousand rows of shipment data imported into R as a data
frame, with two columns of particular interest, col 1 is the entry date, and
col 2 is the tracking number (colname is REQ.NR). Tracking numbers should be
unique but on occassion aren't because they get entered more than once.
I am just starting to experiment with writing a function and have run into
what seems like a limitation or more likely a lack of understanding on my
part.
Very Simple Example: I want to define a function that does 1+1=2.
z<-1
ADD<-function(x)
{
x<-x+1
}
ADD(z)
z
output for z is 1 not the expec
Has anyone every used Revolution Analytics? It claims to be faster than R,
but when I ran a for loop of linear regression that requires a couple of
minutes to process in RStudio. Revolution Analytics has a run time that was
exactly the same. I was just wondering if anyone has experience with the tw
1.15 60 0.553555415 0.574892872
1.15 60 0.563183983 0.564029359
Shouldn't the function row out the second one, since it it higher in
position 3 and lower in position 4 i.e. it should not all be yes?
--
View this message in context:
http://r.789695.n4.n
Can someone verify for me if the for loop below is really calculating the
nonzero min for each row of a matrix? I have a bug somewhere in the is
section of code. My first guess is how I am find the the nonzero min of each
row of my matrix. The overall idea is to make sure I am investing all of my
m
Any chance I could ask for an idiots guide for function to.keep(x). I
understand how to use it but not what some of the lines are doing. Comments
would be extremely helpful.
--
View this message in context:
http://r.789695.n4.nabble.com/Speeding-up-a-loop-tp4637201p4637316.html
Sent from the R
next for loop question.
I need a loop that removes a row from a matrix if it is worse in positions
1,2,3,4 than another row in the matrix. right now my matrix is 503028x26.
Rule to define worse position1 is smaller, position2 is smaller, position3
is higher, and position4 is smaller
Example:
r
That is faster than what I was doing and reducing 15% of my iterations it
still very helpful.
Next question.
I need to multiply each row x[i,] of the matrix x by another matrix A.
Specifically
for(i in 1:n)
{
If (x[i,]%*%A[,1]<.5 || x[i,]%*%A[,2]<42 || x[i,]%*%A[,3]>150)
{
x<-x[-i,]
n<-n-1
}.
General problem: I have 20 projects that can be invested in and I need to
decide which combinations meet a certain set of standards. The total
possible combinations comes out to 2^20. However I know for a fact that the
number of projects must be greater than 5 and less than 13. So far the the
code
Am I correct in assuming that the output below essentially translates to
"Males have a mean time that is significantly lower than Females"? Is this
the correct way to interpret the fact that the coefficient is negative?
Assume the variale sex is treated as a factor with Female =0 and Male=1.
survm
When reading about surv(). I saw the following statement "Although unusual,
the event indicator can be omitted, in which case all subjects are assumed
to have an event."
So I tried the following
1. survobj<-surv(mydata$Time) vs. 2. survobj<-surv(mydata$Time,
mydata$Event)
where mydata$Event i
Consider the following generic code for a survival model
survobj<-Surv(data$Time,data$Satisfactory)
survmodel<-survreg(survobj~x1+x2+x3+x4+x5+x6, data=data, dist="weibull")
survsum<-summary(survmodel)
survsum
My question: Does anyone know what exactly survreg() does differently if
x1<-factor(dat
I saw an example online of taking hclust dendrogram and plotting it using
ggplot2 and thought I would give it a try to see what it would look like. I
get an error when trying to use ggplot; Error: ggplot2 doesn't know how to
deal with data of class phylo. Regular plot works fine but I can't get
ggp
Sorry but I am not a student, at least not since 2007. However I am
performing grunt work for a someone with a Ph.D. so it does remind me of the
student days. I just have a pay check instead of student loans.
--
View this message in context:
http://r.789695.n4.nabble.com/Inverse-matrix-using-
General goal: Write R code to find the inverse matrix of an nxn positive
definite symmetric matrix. Use solve() to verify your code works.
Started with a 3x3 matrix example to build the code, but something dosen't
seem to be working. I just don't know where I am going wrong.
##Example matrix I fo
So I take it 3D pie charts are out?
P.S. It is not about hiding anything. It is about consulting and being told
by your client to make 3D pie charts and change this font or that color to
make the graphs more apealing. Given that I am the one trying to open the
door to using R where I work it woul
Does anyone know how to create a 3D Bargraph using ggplot2/qplot. I don't
mean 3D as in x,y,z coordinates. Just a 2D bar graph with a 3D shaped bard.
See attached excel file for an example.
Before anyone asks I know that 3D looking bars don't add anything except
"prettiness".
http://r.789695.n4.
I just wanted the post the results of the emails I been sending/getting. The
following command will create the graphs and save them to the location of
your choice. The names are graph1.png, graph2.png etc.
for(i in 1:4) {
png( file=paste("C:/Insert file location/graph",i,".png", sep="") )
I have 4 columns and 56 rows of made up data that I want to plot as a series
of bar graphs. The idea is to create one bar graph for each of the 4 columns
using a for loop. I tried the following command in RStudio and when I type x
in the console I get just the 4th graph instead of all four graphs.
Any ideas of what is happening when I attempt to load XLConnect? I think I
installed everything correctly. I posted what I get when I installed rJava
as well as when I attempted to load rJava directly. Thanks in advance for
any help you can give on this.
library(XLConnect)
Loading required packag
library(xlsReadWrite)
mydata<-read.xls("file path", header=TRUE)
however if I change xls to csv it works just fine. Any ideas what I'm doing
wrong? I have have also using the package gdata with the exact same error.
Below is the error that pops up.
Error in findPerl(verbose = verbose) :
perl
I took some data from an online poll about which R GUI people used most and I
am messing around with it to learn how to use qplot. Specifically I am
making a horizontal bar graph and I have two questions.
1. The categories are ordered in rather strange way at least to me. It is
not alphabetical o
I am learning ggplot2 commands specifically qplot for the time being and I
have figured out how to create histograms and normal density curves but I am
not sure how to add a normal bell curve or other dist. as well on top of a
histogram.
Here are the two graphs that I created.
## Histogram
t<-
I am learning ggplot2 commands and I have figured out how to create
histograms and density curves but I am not sure how to add a density curve
on top of a histogram.
Here are the two graphs that I created.
## Histogram
t<-rnorm(500)
w<-qplot(t, main="Normal Random Sample", fill=I("blue"), colou
I am just learning to use qplot and can't get the fill/colour to work. Below
is the R code for a scatter plot and bar graph.
library(ggplot2)
x<-c(1,2,3,4,5,6,7)
y<-c(1,2,3,2,5,6,3)
qplot(x,y, main="Scatter Plot Test", xlab="X Label Test", ylab="Y Label
Test", colour="blue")z<-c("van", "van", "van
I used manova() with one predictor variable and four factor levels call them
A, B, C, and D. There are 12 response variables. I now want to perform
pairwise comparisons for A-B, A-C, etc. for all 12 response variables.
If I were doing an ANOVA test I would run TukeyHSD() and be done. However
mano
The following code works mostly. It runs fine but...
1. Is there a way to increment the xlab for each graph? I would like to have
Graph 1, Graph 2, etc. Right now it just gives me Graph i over and over
again.
2. Is there a way to get the x-axis and y-axis to be bold or at least a
darker color?
I figured out that attributes is the command that I was trying to find. It
allowed me to find out that I was needing to use "stats" not "Df" or
"Pillai" etc. Following command worked.
> S1<-as.vector(S$stats[1,])
However when I try the same thing with summary.aov it is not working.
>SA<-summary.
SA gives the output:
Response IPS1 :
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(WSD) 3 3.3136 1.10455 23.047 5.19e-12 ***
Residuals 129 6.1823 0.04793
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
.
.
.
There are 11 more just
I just finished a MANOVA test and got the following output:
> summary(M, test="Pillai")
Df Pillai approx F num Df den DfPr(>F)
as.factor(X) 3 1.1922 6.5948 36360 < 2.2e-16 ***
Residuals 129
---
Signif. codes: 0 '
I have columns of data in Excel 2007, A2:A196, B2:B196...ET2:ET196 that I
would like to place into arrays in R. I have been trying to write a macro
that would automatically create all of my arrays for me with a array names
coming from the cells A1, B1, etc.
I can manually create an array using REx
obile (434)-989-7948
From: David Winsemius [via R] [ml-node+2310616-1859960724-371...@n4.nabble.com]
Sent: Monday, August 02, 2010 1:33 PM
To: Reith, William [USA]
Subject: Re: Problems with normality req. for ANOVA
On Aug 2, 2010, at 9:33 AM, wwreith wrote:
>
I am conducting an experiment with four independent variables each of which
has three or more factor levels. The sample size is quite large i.e. several
thousand. The dependent variable data does not pass a normality test but
"visually" looks close to normal so is there a way to compute the affect
37 matches
Mail list logo