:R의 인터랙티브 그래프 다음 XML 코드에서 rggobi
<?xml version = "1.0"?>
<Company >
<shareprice>
<timeStamp> 12:00:00.01</timeStamp>
<Price> 25.02</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:00.02</timeStamp>
<Price> 15</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:01.025</timeStamp>
<Price> 15.02</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:01.031</timeStamp>
<Price> 18.25</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:01.039</timeStamp>
<Price> 18.54</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:01.050</timeStamp>
<Price> 16.52</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:02.01</timeStamp>
<Price> 17.50</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:03.01</timeStamp>
<Price> 25.02</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:05.02</timeStamp>
<Price> 30</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:11.025</timeStamp>
<Price> 32.25</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:12.031</timeStamp>
<Price> 26.05</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:15.039</timeStamp>
<Price> 18.54</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:19.050</timeStamp>
<Price> 16.52</Price>
</shareprice>
<shareprice>
<timeStamp> 12:01:02.01</timeStamp>
<Price> 17.50</Price>
</shareprice>
</Company>
다음과 같은 R 코드를 사용하여 :
library(ggplot2)
library (XML)
test.df <- xmlToDataFrame(file.choose())
test.df
sapply(test.df, class)
test.df$timeStamp <- strptime(as.character(test.df$timeStamp), "%H:%M:%OS")
test.df$Price <- as.numeric(as.character(test.df$Price))
sapply(test.df, class)
options("digits.secs"=3)
summary (test.df)
with(test.df, plot(timeStamp, Price))
sd (test.df$Price)
mean(test.df$timeStamp)
test.df$timeStamp <- test.df[1,"timeStamp"] + cumsum(runif(7)*60)
summary(test.df)
qplot(timeStamp,Price,data=test.df,geom=c("point","line"))
Price <- summary(test.df$Price)
print (Price)
난에 사용자를 허용 할 대화 형 그래프를 만들 싶습니다을 점을 클릭하고 점의 값에 대한 정보를 얻습니다 (예 : 값이 이유를 뛰어 넘는 경우).이 대화식 그래프를 웹 페이지에 넣을 수 있기를 원합니다. GGOBI를 사용하여이 작업을 수행하는 것이 제안되었지만 다른 사람들은 R에 머물러 rggobi 라이브러리를 사용할 수 있다고 말합니다. 나는 이것에 대한 경험이 없기 때문에 직접 또는 특정 자원 (몇 년 동안 그물을 찾다가 아무 것도 찾을 수 없다)에 대한 몇 가지 질문을 할 것이라고 생각했다.
그래프 아래에 가격 요약. 지금은 Windows의 BATCH 파일에서 코드를 실행하고 요약 인쇄가 아닌 pdf 파일의 그래프를 반환합니다. 대화식 그래프와 요약을 생성 할 수 있도록 코드/BATCH 파일을 설정하는 방법이 있습니까?
Ggobi는 웹과 아무 관련이 없습니다. 당신은 잘못된 기술을보고 있습니다. –
XML을 게시하는 대신 R에로드하고 원하는 모든 변환을 적용한 다음 dput (dest.df)의 출력을 질문에 붙여 넣는 것이 좋습니다. 그러면 응답자에게 몇 가지 단계가 저장됩니다. – JoFrhwld
다음 번에 시도해 보겠습니다. 내가 dput (test.)을 실행할 수 있다고 가정 할 때 나는 맞습니까?df) R 코드 끝 부분에 구조체 (list (.... 질문이 있습니까? –