[RStudio] 텍스트 마이닝 코드

Programming 2023. 11. 12. 20:09 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.


install.packages("multilinguer")
library(multilinguer)


install.packages("remotes")
remotes::install_github("haven-jeon/KoNLP",
                         force = T,
                         upgrade = "never", 
                         INSTALL_opts = c("--no-multiarch"))


library("wordcloud")
library("RColorBrewer")
library(KoNLP)
useNIADic()
Sys.setenv(JAVA_HOME="C:\\Program Files\\Java\\jre-1.8") # JAVA 환경 설정정
Sys.getenv("JAVA_HOME") # JAVA 환경 설정 확인

data1 <- readLines("c:/TEMP/wordcl1.csv")
data2 <- extractNoun(data1) # list 형태로 바뀜
data3 <- unlist(data2)
data3
data4 <- Filter(function(x) {
  nchar(x) <= 10 & nchar(x) > 1}, data3)
wordcount <- table(data4)
sort(wordcount, decreasing = T)
palete <- brewer.pal(9,"Set3")  
wordcloud(names(wordcount),
          freq=wordcount,
          scale=c(5,1),
          rot.per=0.25,
          min.freq=1, 
          random.order=F,
          random.color=T,
          colors=palete)

336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

https://stackoverflow.com/questions/13579953/how-can-i-paste-100000-without-it-being-shortened-to-1e05

 

How can I paste 100000 without it being shortened to 1e+05?

Question: How can I use paste without 100000 becoming 1e+05? Sorry in advance if this question seems frivolous (but it has resulted in a bug in my code). I use R to call an external script, so wh...

stackoverflow.com

 

R> options("scipen"=10) # set high penalty for scientific display

'Programming' 카테고리의 다른 글

[RStudio] 텍스트 마이닝 코드  (0) 2023.11.12
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

 

 

 

 

 

Visual Studio 2017

 

 

 

 

빌드 도중 컴파일러의 힙 공간이 부족합니다.

 

라는 에러가 발생하는 경우가 있다.

 

 

 

 

 

 

해당 에러는

 

힙 공간의 부족으로 발생하는 에러로

 

힙 공간을 기본값보다 늘려주면

 

문제가 해결된다.

 

 

 

 

 

프로젝트 속성 페이지

 

C/C++ -> 명령줄 -> 추가 옵션

 

기본값은 /Zm100

 

두배로 늘이고 싶다면 /Zm200 으로 설정하면 된다.

 

 

https://docs.microsoft.com/ko-kr/cpp/build/reference/zm-specify-precompiled-header-memory-allocation-limit?view=msvc-160 

 

/Zm(미리 컴파일된 헤더 메모리 할당 제한 지정)

자세한 정보: /Zm(미리 컴파일된 헤더 메모리 할당 제한 지정)

docs.microsoft.com

 

 

 

 

 

천안 코딩 과외합니다.

정보올림피아드 2021. 8. 9. 16:29 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

지역 : 천안, 아산, 청주

 

 

 

강의 과목 : 프로그래밍, 정보올림피아드, CCNA, CCNP, 코딩, 아두이노, 로봇

 

 

 

경력 : 지도학생) 2013 초등부 정보올림피아드 전국대회 은상 수상

 

         전) 서울 서울특별시립종합직업전문학교 외부강사

 

         전) 청주 그린컴퓨터학원 프로그래밍 강사

 

         전) 천안 그린컴퓨터학원 프로그래밍 강사

 

         전) 아산소재 대학교 시간강사

 

         전) 천안소재 대학교 시간강사

 

 

 

         현) 대학원 박사과정 재학중

 

         현) 기업부설연구소 연구원 근무중

 

 

 

 

과외 개설 조건 : 그룹 4인 이상시 개설 

( 현재 서울 거주중이라 주말 4인 이상 가능 시 강의 개설합니다. )

 

 

과외 장소 : 자택 / 학원 / 스터디룸 / ...... 모두 가능합니다.

 

 

 

 

자세한 문의는

 

 

대기 문의 및 올림피아드 대회 정보에 대한 문의도 주셔도 됩니다.

 

tansanc23@gmail.com 으로 문의해 주세요.

 

공일공-구구육이-일사일칠



출처: https://tansanc.tistory.com/501 [TanSanC]

336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

 

 

MFC D8040 : 자식 프로세스를 만들거나 통신하는 동안 오류가 발생했습니다

 

 

 

 

 

 

 

 

특정 PC에서만 발생하는 경우로

 

프로젝트의 경로에 한글이 포함된 경우 발생한다.

 

 

 

 

 

 

 

 

경로에 한글이 포함되어 있지 않은 곳으로 옮기면 정상 빌드

 

 

336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

컴파일러 경고 (수준 4) C4840

variadic 함수의 인수로 서 'type' 클래스를 이식 불가능 하 게 사용 합니다.

설명

Variadic 함수에 전달 되는 클래스 또는 구조체는 일반적으로 copyable 이어야 합니다. 해당 개체를 전달할 때 컴파일러는 비트 복사본을 만들기만 하고 생성자 또는 소멸자를 호출하지 않습니다.

이 경고는 Visual Studio 2017부터 사용할 수 있습니다.

예제

다음 샘플에서는 C4840를 생성 하 고 수정 하는 방법을 보여 줍니다.

 

// C4840.cpp
// compile by using: cl /EHsc /W4 C4840.cpp
#include <stdio.h>

int main()
{
    struct S {
        S(int i) : i(i) {}
        S(const S& other) : i(other.i) {}
        operator int() { return i; }
    private:
        int i;
    } s(0);

    printf("%i\n", s); // warning C4840 : non-portable use of class 'main::S'
                       // as an argument to a variadic function
    // To correct the error, you can perform a static cast
    // to convert the object before passing it:
    printf("%i\n", static_cast<int>(s));
}

 

를 사용 하 여 작성 및 관리 되는 문자열의 경우 CStringW 제공 된를 operator LPCWSTR() 사용 하 여 CStringW 개체를 서식 문자열에 필요한 C 스타일 문자열 포인터로 캐스팅 해야 합니다.

 

CStringW str1;
    CStringW str2;
    // ...
    str1.Format("%s", static_cast<LPCWSTR>(str2));

 

RIFF AudioEncoding Values

Programming/C,CPP,CS 2021. 4. 22. 15:50 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

These "TwoCC" audio encoding codes are used in RIFF and ASF files.

 

 

 

 

www.bibliotecacpa.org.ar/greenstone/perllib/cpan/Image/ExifTool/RIFF.pm

 

C# String.format 사용법

Programming/C,CPP,CS 2021. 3. 17. 14:15 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

String Format for Int [C#]

Integer numbers can be formatted in .NET in many ways. You can use static method String.Format or instance method int.ToString. Following examples show how to align numbers (with spaces or zeroes), how to format negative numbers or how to do custom formatting like phone numbers.

Add zeroes before number

To add zeroes before a number, use colon separator „:“ and write as many zeroes as you want.

[C#]
String.Format("{0:00000}", 15); // "00015" String.Format("{0:00000}", -15); // "-00015"

Align number to the right or left

To align number to the right, use comma „,“ followed by a number of characters. This alignment option must be before the colon separator.

[C#]
String.Format("{0,5}", 15); // " 15" String.Format("{0,-5}", 15); // "15 " String.Format("{0,5:000}", 15); // " 015" String.Format("{0,-5:000}", 15); // "015 "

Different formatting for negative numbers and zero

You can have special format for negative numbers and zero. Use semicolon separator „;“ to separate formatting to two or three sections. The second section is format for negative numbers, the third section is for zero.

[C#]
String.Format("{0:#;minus #}", 15); // "15" String.Format("{0:#;minus #}", -15); // "minus 15" String.Format("{0:#;minus #;zero}", 0); // "zero"

Custom number formatting (e.g. phone number)

Numbers can be formatted also to any custom format, e.g. like phone numbers or serial numbers.

[C#]
String.Format("{0:+### ### ### ###}", 447900123456); // "+447 900 123 456" String.Format("{0:##-####-####}", 8958712551); // "89-5871-2551"

 

 

출처 : www.csharp-examples.net/string-format-int/

 

String Format for Int [C#]

String Format for Int [C#] Integer numbers can be formatted in .NET in many ways. You can use static method String.Format or instance method int.ToString. Following examples show how to align numbers (with spaces or zeroes), how to format negative numbers

www.csharp-examples.net

 

[연말 스페셜] [성수] 낙원관

먹거리 2020. 12. 18. 17:52 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

[연말 스페셜] [성수] 낙원관

 

 

 

 

 

 

 

차돌박이 짬뽕 11,000 원

 

 

 

김치찌개에 차돌박이 사리와 중면 사리를 추가한 맛....

 

비추...

 

 

 

 

 

 

336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

 

 

 

ConfigurationSettings.AppSettings

 

->

 

System.Configuration.ConfigurationManager.AppSettings